FileTreeWalk
This class is intended to implement different file traversal methods. It allows to iterate through all files inside a given directory.
Use File.walk, File.walkTopDown or File.walkBottomUp extension functions to instantiate a FileTreeWalk instance.
If the file path given is just a file, walker iterates only it. If the file path given does not exist, walker iterates nothing, i.e. it's equivalent to an empty sequence.
Since Kotlin
1.0Functions
Sets the maximum depth of a directory tree to traverse. By default there is no limit.
Set a callback function, that is called on a directory when it's impossible to get its file list.
Extensions
Returns a sequence containing all elements that are instances of specified class.
Appends all elements that are instances of specified class to the given destination.
Returns a new SortedSet of all elements.