|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
org.gradle.api.file.FileCollectionorg.gradle.api.file.FileTree
interface FileTree extends FileCollection
A FileTree represents a hierarchy of files. It extends FileCollection to add hierarchy query and manipulation methods. You typically use a FileTree to represent files to copy or the contents of an archive.
You can obtain a FileTree instance using org.gradle.api.Project#fileTree(java.util.Map).
Method Summary | |
---|---|
FileTree
|
matching(Closure filterConfigClosure)
Restricts the contents of this tree to those files matching the given filter. |
FileTree
|
matching(PatternFilterable patterns)
Restricts the contents of this tree to those files matching the given filter. |
FileTree
|
plus(FileTree fileTree)
Returns a { |
FileTree
|
visit(FileVisitor visitor)
Visits the files and directories in this file tree. |
FileTree
|
visit(Closure visitor)
Visits the files and directories in this file tree. |
Methods inherited from interface FileCollection | |
---|---|
add, addToAntBuilder, addToAntBuilder, asType, getAsFileTree, getAsPath, getFiles, getSingleFile, plus, stopExecutionIfEmpty |
Methods inherited from interface java.lang.Iterable | |
---|---|
iterator |
Methods inherited from class java.lang.Object | |
---|---|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Method Detail |
---|
public FileTree matching(Closure filterConfigClosure)
Restricts the contents of this tree to those files matching the given filter. The filtered tree is live, so that any changes to this tree are reflected in the filtered tree.
The given closure is used to configure the filter. A org.gradle.api.tasks.util.PatternFilterable is passed to the closure as it's delegate. Only files which match the specified include patterns will be included in the filtered tree. Any files which match the specified exclude patterns will be excluded from the filtered tree.
public FileTree matching(PatternFilterable patterns)
Restricts the contents of this tree to those files matching the given filter. The filtered tree is live, so that any changes to this tree are reflected in the filtered tree.
The given pattern set is used to configure the filter. Only files which match the specified include patterns will be included in the filtered tree. Any files which match the specified exclude patterns will be excluded from the filtered tree.
public FileTree plus(FileTree fileTree)
public FileTree visit(FileVisitor visitor)
public FileTree visit(Closure visitor)
Groovy Documentation