For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

getAsFileTree

abstract fun getAsFileTree(): FileTree(source)

Converts this collection to a FileTree, if not already. For each file in this collection, the resulting file tree will contain the source file at the root of the tree. For each directory in this collection, the resulting file tree will contain all the files under the source directory.

The returned FileTree is live, and tracks changes to this file collection and the producer tasks of this file collection.

Return

this collection as a FileTree. Never returns null.

Since

0.8