Interface DirectoryProperty
- All Known Subinterfaces:
DirectoryVar
Represents some configurable directory location, whose value is mutable and is not necessarily currently known until later.
Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created using the ProjectLayout.directoryProperty() method.
- Since:
- 4.3
-
Method Summary
Modifier and TypeMethodDescriptionReturns 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.
-
Method Details
-
getAsFile
-
getAsFileTree
-
set
Sets the location of this directory. -
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.
-