Package org.gradle.api.file
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 aDirectory
whose value is the given path resolved relative to the value of this directory.dir
(Provider<? extends CharSequence> path) Returns aDirectory
whose value is the given path resolved relative to the value of this directory.Returns aRegularFile
whose value is the given path resolved relative to the value of this directory.file
(Provider<? extends CharSequence> path) Returns aRegularFile
whose value is the given path resolved relative to the value of this directory.Views the location of this directory as aFile
.Returns aFileTree
that allows the files and directories contained in this directory to be queried.void
Sets the location of this directory.
-
Method Details
-
getAsFile
Views the location of this directory as aFile
. -
getAsFileTree
FileTree getAsFileTree()Returns aFileTree
that allows the files and directories contained in this directory to be queried. -
set
Sets the location of this directory. -
dir
Returns aDirectory
whose value is the given path resolved relative to the value of this directory.- Parameters:
path
- The path. Can be absolute.- Returns:
- The directory.
-
dir
Returns aDirectory
whose 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 aRegularFile
whose 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 aRegularFile
whose 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.
-