ConfigurableFileTree

A FileTree with a single base directory, which can be configured and modified.

See also

Create an instance of this as a managed property (preferred).

Create an instance of this manually.

Functions

Link copied to clipboard
abstract fun addToAntBuilder(builder: Any, nodeName: String): Any
abstract fun addToAntBuilder(builder: Any, nodeName: String, type: FileCollection.AntType)
Adds this collection to an Ant task as a nested node.
abstract fun addToAntBuilder(node: Any, childNodeName: String): Any
Link copied to clipboard
abstract fun builtBy(tasks: Array<Any>): ConfigurableFileTree
Registers some tasks which build the files of this collection.
Link copied to clipboard
abstract fun contains(file: File): Boolean
Determines whether this collection contains the given file.
Link copied to clipboard
abstract fun exclude(excludeSpec: Closure): PatternFilterable
abstract fun exclude(excludeSpec: Spec<FileTreeElement>): PatternFilterable
Adds an exclude spec.
abstract fun exclude(excludes: Iterable<String>): PatternFilterable
abstract fun exclude(excludes: Array<String>): PatternFilterable
Adds an ANT style exclude pattern.
Link copied to clipboard
abstract fun filter(filterClosure: Closure): FileCollection
abstract fun filter(filterSpec: Spec<in File>): FileCollection
Restricts the contents of this collection to those files which match the given criteria.
Link copied to clipboard
open fun forEach(action: Consumer<in T>)
Link copied to clipboard
abstract fun from(dir: Any): ConfigurableFileTree
Specifies base directory for this file tree using the given path.
Link copied to clipboard
abstract fun getAsFileTree(): FileTree
Returns this.
Link copied to clipboard
abstract fun getAsPath(): String
Returns the contents of this collection as a platform-specific path.
Link copied to clipboard
Returns a dependency which contains the tasks which build this artifact.
Link copied to clipboard
abstract fun getBuiltBy(): Set<Any>
Returns the set of tasks which build the files of this collection.
Link copied to clipboard
abstract fun getDir(): File
Returns the base directory of this file tree.
Link copied to clipboard
Returns the contents of this file collection as a Provider of FileSystemLocation instances.
Link copied to clipboard
abstract fun getExcludes(): Set<String>
Returns the set of exclude patterns.
Link copied to clipboard
abstract fun getFiles(): Set<File>
Returns the contents of this tree as a flattened Set.
Link copied to clipboard
abstract fun getIncludes(): Set<String>
Returns the set of include patterns.
Link copied to clipboard
abstract fun getPatterns(): PatternSet
Returns the patterns which select the files under the base directory.
Link copied to clipboard
abstract fun getSingleFile(): File
Returns the content of this collection, asserting it contains exactly one file.
Link copied to clipboard
abstract fun include(includeSpec: Closure): PatternFilterable
abstract fun include(includeSpec: Spec<FileTreeElement>): PatternFilterable
Adds an include spec.
abstract fun include(includes: Iterable<String>): PatternFilterable
abstract fun include(includes: Array<String>): PatternFilterable
Adds an ANT style include pattern.
Link copied to clipboard
abstract fun isEmpty(): Boolean
Returns true if this collection is empty.
Link copied to clipboard
abstract fun iterator(): Iterator<T>
Link copied to clipboard
abstract fun matching(@DelegatesTo(value = PatternFilterable::class) filterConfigClosure: Closure): FileTree
abstract fun matching(filterConfigAction: Action<in PatternFilterable>): FileTree
abstract fun matching(patterns: PatternFilterable): FileTree
Restricts the contents of this tree to those files matching the given filter.
Link copied to clipboard
abstract fun minus(collection: FileCollection): FileCollection
Returns a FileCollection which contains the difference between this collection and the given collection.
Link copied to clipboard
abstract fun plus(collection: FileCollection): FileCollection
Returns a FileCollection which contains the union of this collection and the given collection.
abstract fun plus(fileTree: FileTree): FileTree
Returns a FileTree which contains the union of this tree and the given tree.
Link copied to clipboard
abstract fun setBuiltBy(tasks: Iterable<out Any>): ConfigurableFileTree
Sets the tasks which build the files of this collection.
Link copied to clipboard
abstract fun setDir(dir: Any): ConfigurableFileTree
Specifies base directory for this file tree using the given path.
Link copied to clipboard
abstract fun setExcludes(excludes: Iterable<String>): PatternFilterable
Set the allowable exclude patterns.
Link copied to clipboard
abstract fun setIncludes(includes: Iterable<String>): PatternFilterable
Set the allowable include patterns.
Link copied to clipboard
Link copied to clipboard
abstract fun visit(@DelegatesTo(value = FileVisitDetails::class) visitor: Closure): FileTree
abstract fun visit(visitor: Action<in FileVisitDetails>): FileTree
abstract fun visit(visitor: FileVisitor): FileTree
Visits the files and directories in this file tree.