api / org.gradle.kotlin.dsl / InitScriptApi / fileTree

fileTree

fun fileTree(baseDir: Any): ConfigurableFileTree

Creates a new ConfigurableFileTree using the given base directory.

The given baseDir path is evaluated as per KotlinInitScript.file.

The returned file tree is lazy, so that it scans for files only when the contents of the file tree are queried. The file tree is also live, so that it scans for files each time the contents of the file tree are queried.

Parameters

baseDir - The base directory of the file tree. Evaluated as per KotlinInitScript.file.

Return
The file tree.

fun fileTree(baseDir: Any, configuration: ConfigurableFileTree.() -> Unit): ConfigurableFileTree

Creates a new ConfigurableFileTree using the given base directory.

Parameters

baseDir - The base directory of the file tree. Evaluated as per KotlinInitScript.file.

configuration - The block to use to configure the file tree.

Return
The file tree.

See Also

KotlinInitScript.fileTree