interface ConfigurableFileTree : FileTree, DirectoryTree, PatternFilterable, Buildable
A FileTree with a single base directory, which can be configured and modified.
You can obtain a ConfigurableFileTree
instance by calling org.gradle.api.Project#fileTree(java.util.Map)
.
abstract fun builtBy(vararg tasks: Any): ConfigurableFileTree
Registers some tasks which build the files of this collection. |
|
abstract fun from(dir: Any): ConfigurableFileTree
Specifies base directory for this file tree using the given path. The path is evaluated as per |
|
abstract fun getBuiltBy(): MutableSet<Any>
Returns the set of tasks which build the files of this collection. |
|
abstract fun getDir(): File
Returns the base directory of this file tree. |
|
abstract fun setBuiltBy(tasks: MutableIterable<*>): ConfigurableFileTree
Sets the tasks which build the files of this collection. |
|
abstract fun setDir(dir: Any): ConfigurableFileTree
Specifies base directory for this file tree using the given path. The path is evaluated as per |
abstract fun exclude(vararg excludes: String): PatternFilterable abstract fun exclude(excludes: MutableIterable<String>): PatternFilterable
Adds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed. abstract fun exclude(excludeSpec: Spec<FileTreeElement>): PatternFilterable
Adds an exclude spec. This method may be called multiple times to append new specs. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed. abstract fun exclude(excludeSpec: Closure<Any>): PatternFilterable
Adds an exclude spec. This method may be called multiple times to append new specs.The given closure is passed a org.gradle.api.file.FileTreeElement as its parameter. The closure should return true or false. Example: If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.
|
|
abstract fun getAsFileTree(): FileTree
Returns this. |
|
abstract fun getExcludes(): MutableSet<String>
Returns the set of exclude patterns. |
|
abstract fun getFiles(): MutableSet<File>
Returns the contents of this tree as a flattened Set. |
|
abstract fun getIncludes(): MutableSet<String>
Returns the set of include patterns. |
|
abstract fun getPatterns(): PatternSet
Returns the patterns which select the files under the base directory. |
|
abstract fun include(vararg includes: String): PatternFilterable abstract fun include(includes: MutableIterable<String>): PatternFilterable
Adds an ANT style include pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns to be processed. abstract fun include(includeSpec: Spec<FileTreeElement>): PatternFilterable
Adds an include spec. This method may be called multiple times to append new specs. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns or specs to be included. abstract fun include(includeSpec: Closure<Any>): PatternFilterable
Adds an include spec. This method may be called multiple times to append new specs. The given closure is passed a org.gradle.api.file.FileTreeElement as its parameter. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns or specs to be included. |
|
abstract fun matching(filterConfigClosure: Closure<Any>): FileTree
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 its 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. abstract fun matching(filterConfigAction: Action<in PatternFilterable>): FileTree
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 action is used to configure the filter. A org.gradle.api.tasks.util.PatternFilterable is passed to the action. 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. abstract fun matching(patterns: PatternFilterable): FileTree
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. |
|
abstract fun plus(fileTree: FileTree): FileTree
Returns a |
|
abstract fun setExcludes(excludes: MutableIterable<String>): PatternFilterable
Set the allowable exclude patterns. Note that unlike |
|
abstract fun setIncludes(includes: MutableIterable<String>): PatternFilterable
Set the allowable include patterns. Note that unlike |
|
abstract fun visit(visitor: FileVisitor): FileTree
Visits the files and directories in this file tree. Files are visited in depth-first prefix order, so that a directory is visited before its children. abstract fun visit(visitor: Closure<Any>): FileTree
Visits the files and directories in this file tree. Files are visited in depth-first prefix order, so that a directory is visited before its children. The file/directory to be visited is passed to the given closure as a abstract fun visit(visitor: Action<in FileVisitDetails>): FileTree
Visits the files and directories in this file tree. Files are visited in depth-first prefix order, so that a directory is visited before its children. The file/directory to be visited is passed to the given action as a |