Interface DirectoryProperty
- All Superinterfaces:
FileSystemLocationProperty<Directory>, HasConfigurableValue, Property<Directory>, Provider<Directory>
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.Returns aFileTreethat allows the files and directories contained in this directory to be queried.Sets the value of the property the given value, replacing whatever value the property already had.Sets the property to have the same value of the given provider, replacing whatever value the property already had.Methods inherited from interface FileSystemLocationProperty
getAsFile, getLocationOnly, setMethods inherited from interface HasConfigurableValue
disallowChangesMethods inherited from interface Property
finalizeValue, set, set
-
Method Details
-
getAsFileTree
-
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. -
value
Sets the property to have the same value of the given provider, replacing whatever value the property already had. This property will track the value of the provider and query its value each time the value of the property is queried. When the provider has no value, this property will also have no value.This is the same as
Property.set(Provider)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.
-