Package org.gradle.api.file
Schnittstelle Directory
- Alle Superschnittstellen:
FileSystemLocation
Represents a directory at some fixed location on the file system.
Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created
using the dir(String) method or using various methods on ProjectLayout such as ProjectLayout.getProjectDirectory().
- Seit:
- 4.1
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns aDirectorywhose location is the given path, resolved relative to this directory.dir(Provider<? extends CharSequence> path) Returns aRegularFilewhose location is the given path, resolved relative to this directory.file(Provider<? extends CharSequence> path) Returns aProviderwhose value is aRegularFilewhose location is the given path resolved relative to this directory.Returns aFileCollectioncontaining the given files, whose locations are the given paths resolved relative to this directory, as defined byProject.files(Object...).Returns the location of this directory, as an absoluteFile.Returns aFileTreethat allows the files and directories contained in this directory to be queried.
-
Methodendetails
-
getAsFile
File getAsFile()Returns the location of this directory, as an absoluteFile.- Angegeben von:
getAsFilein SchnittstelleFileSystemLocation- Gibt zurück:
- the File
- Seit:
- 4.2
-
getAsFileTree
FileTree getAsFileTree()Returns aFileTreethat allows the files and directories contained in this directory to be queried. -
dir
Returns aDirectorywhose location is the given path, resolved relative to this directory.- Parameter:
path- The path. Can be absolute.- Gibt zurück:
- The directory.
-
dir
Returns aProviderwhose value is aDirectorywhose location is the given path resolved relative to this directory.The return value is live and the provided
pathis queried each time the return value is queried.- Parameter:
path- The path provider. Can have value that is an absolute path.- Gibt zurück:
- The provider.
-
file
Returns aRegularFilewhose location is the given path, resolved relative to this directory.- Parameter:
path- The path. Can be absolute.- Gibt zurück:
- The file.
-
file
Returns aProviderwhose value is aRegularFilewhose location is the given path resolved relative to this directory.The return value is live and the provided
pathis queried each time the return value is queried.- Parameter:
path- The path provider. Can have value that is an absolute path.- Gibt zurück:
- The file.
-
files
Returns aFileCollectioncontaining the given files, whose locations are the given paths resolved relative to this directory, as defined byProject.files(Object...). This method can also be used to create an empty collection, but the collection may not be mutated later.- Parameter:
paths- The paths to the files. May be empty.- Gibt zurück:
- The file collection.
- Seit:
- 6.0
-