Interface DirectoryProperty
Represents some configurable directory location, whose value is mutable.
You can create a DirectoryProperty using ObjectFactory.directoryProperty().
Note: This interface is not intended for implementation by build script or plugin authors.
- Since:
- 4.3
-
Method Summary
Modifier and TypeMethodDescriptionconvention(Directory value) Specifies the value to use as the convention for this property.convention(Provider<? extends Directory> valueProvider) Specifies the provider of the value to use as the convention for this property.Returns aDirectorywhose value is the given path resolved relative to the value of this directory.dir(Provider<? extends CharSequence> path) Returns aDirectorywhose value is the given path resolved relative to the value of this directory.Returns aRegularFilewhose value is the given path resolved relative to the value of this directory.file(Provider<? extends CharSequence> path) Returns aRegularFilewhose value is the given path resolved relative to the value of this directory.Views the location of this directory as aFile.Returns aFileTreethat allows the files and directories contained in this directory to be queried.voidSets the location of this directory.Sets the value of the property the given value, replacing whatever value the property already had.Methods inherited from interface Property
finalizeValue, set, set
-
Method Details
-
getAsFile
-
getAsFileTree
-
set
Sets the location of this directory. -
value
Sets the value of the property the given value, replacing whatever value the property already had.This is the same as
Property.set(Object)but returns this property to allow method chaining. -
convention
Specifies the value to use as the convention for this property. The convention is used when no value has been set for this property.- Specified by:
conventionin interfaceProperty<Directory>- Parameters:
value- The value.- Returns:
- this
-
convention
Specifies the provider of the value to use as the convention for this property. The convention is used when no value has been set for this property.- Specified by:
conventionin interfaceProperty<Directory>- Parameters:
valueProvider- The provider of the value.- Returns:
- this
-
dir
-
dir
Returns aDirectorywhose value is the given path resolved relative to the value of this directory.- Parameters:
path- The path. Can have a value that is an absolute path.- Returns:
- The directory.
-
file
Returns aRegularFilewhose value is the given path resolved relative to the value of this directory.- Parameters:
path- The path. Can be absolute.- Returns:
- The file.
-
file
Returns aRegularFilewhose value is the given path resolved relative to the value of this directory.- Parameters:
path- The path. Can have a value that is an absolute path.- Returns:
- The file.
-