gradle
8.5

# 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.