filterAsTree

fun FileTree.filterAsTree(filter: (FileTreeElement) -> Boolean): FileTree

Restricts the contents of this collection to those files which match the given criteria. The filtered collection is live, so that it reflects any changes to this collection.

Return

The filtered collection.

Parameters

filter

The criteria to use to select the contents of the filtered collection.