# ConfigurableFileCollection

@ManagedType
@SupportsKotlinAssignmentOverloading
interface ConfigurableFileCollection : FileCollection, HasConfigurableValue, SupportsConvention(source)

A `ConfigurableFileCollection` is a mutable `FileCollection`.

Note: This interface is not intended for implementation by build script or plugin authors.

#### See also

ManagedType

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

ObjectFactory

Create an instance of this manually.

## Functions

addToAntBuilder
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
assign
Link copied to clipboard
fun ConfigurableFileCollection.assign(fileCollection: FileCollection)

Sets the ConfigurableFileCollection to contain the source paths of passed collection. This is the same as calling ConfigurableFileCollection.setFrom(fileCollection: FileCollection).

builtBy
Link copied to clipboard
abstract fun builtBy(tasks: Array<Any>): ConfigurableFileCollection
Registers some tasks which build the files of this collection.
contains
Link copied to clipboard
abstract fun contains(file: File): Boolean
Determines whether this collection contains the given file.
convention
Link copied to clipboard
@Incubating
abstract fun convention(paths: Iterable<out Any>): ConfigurableFileCollection
@Incubating
abstract fun convention(@Nullable paths: Array<@Nullable Any>): ConfigurableFileCollection
Specifies the value to use as the convention (default value) to be used when resolving this file collection, if no source paths are explicitly defined.
disallowChanges
Link copied to clipboard
abstract fun disallowChanges()
Disallows further direct changes to this object.
disallowUnsafeRead
Link copied to clipboard
abstract fun disallowUnsafeRead()
Disallows reading the value of this object when its value may not yet be available or may still change.
filter
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.
finalizeValue
Link copied to clipboard
abstract fun finalizeValue()
Calculates the final value of this object and disallows further changes to this object.
finalizeValueOnRead
Link copied to clipboard
abstract fun finalizeValueOnRead()
Requests that the final value of this object be calculated on the next read of the value, if not already known.
forEach
Link copied to clipboard
open fun forEach(action: Consumer<in T>)
from
Link copied to clipboard
abstract fun from(@Nullable paths: Array<@Nullable Any>): ConfigurableFileCollection
Adds a set of source paths to this collection.
getAsFileTree
Link copied to clipboard
abstract fun getAsFileTree(): FileTree
Converts this collection to a FileTree, if not already.
getAsPath
Link copied to clipboard
abstract fun getAsPath(): String
Returns the contents of this collection as a platform-specific path.
getBuildDependencies
Link copied to clipboard
abstract fun getBuildDependencies(): TaskDependency
Returns a dependency which contains the tasks which build this artifact.
getBuiltBy
Link copied to clipboard
abstract fun getBuiltBy(): Set<Any>
Returns the set of tasks which build the files of this collection.
getElements
Link copied to clipboard
abstract fun getElements(): Provider<Set<FileSystemLocation>>
Returns the contents of this file collection as a Provider of FileSystemLocation instances.
getFiles
Link copied to clipboard
abstract fun getFiles(): Set<File>
Returns the contents of this collection as a Set.
getFrom
Link copied to clipboard
abstract fun getFrom(): Set<Any>
Returns the set of source paths for this collection.
getSingleFile
Link copied to clipboard
abstract fun getSingleFile(): File
Returns the content of this collection, asserting it contains exactly one file.
getValue
Link copied to clipboard
operator fun ConfigurableFileCollection.getValue(receiver: Any?, property: KProperty<*>): ConfigurableFileCollection

Property delegate for ConfigurableFileCollection instances.

isEmpty
Link copied to clipboard
abstract fun isEmpty(): Boolean
Returns true if this collection is empty.
iterator
Link copied to clipboard
abstract fun iterator(): Iterator<T>
minus
Link copied to clipboard
abstract fun minus(collection: FileCollection): FileCollection
Returns a `FileCollection` which contains the difference between this collection and the given collection.
plus
Link copied to clipboard
abstract fun plus(collection: FileCollection): FileCollection
Returns a `FileCollection` which contains the union of this collection and the given collection.
setBuiltBy
Link copied to clipboard
abstract fun setBuiltBy(tasks: Iterable<out Any>): ConfigurableFileCollection
Sets the tasks which build the files of this collection.
setFrom
Link copied to clipboard
abstract fun setFrom(paths: Iterable<out Any>)
abstract fun setFrom(@Nullable paths: Array<@Nullable Any>)
Sets the source paths for this collection.
setValue
Link copied to clipboard
operator fun ConfigurableFileCollection.setValue(receiver: Any?, property: KProperty<*>, value: Iterable<*>)

Property delegate for ConfigurableFileCollection instances.

spliterator
Link copied to clipboard
open fun spliterator(): Spliterator<T>
unset
Link copied to clipboard
abstract fun unset(): SupportsConvention
Unsets this object's explicit value, allowing the convention to be selected when evaluating this object's value.
unsetConvention
Link copied to clipboard
abstract fun unsetConvention(): SupportsConvention
Unsets this object's convention value.