Children
Search the contents of a directory and perform operations on the objects encountered
Descendant Processing
All operations/filters that can be also performed on all descendants of a path. Calling the descendants method instead of children will visit all descendants of the Path rather than just the children.
import scalax.file.Path
val path:Path = Path("/tmp/")
// by default only the files contained in the current path are returned but if depth
// is set (<0 will traverse entire tree) then the stream will visit subdirectories in
// pre-order traversal
// search for a .gitignore file down to a depth of 4
val gitIgnoreRestrictedTree: Option[Path] = path.descendants (depth=4).find (_.name == ".gitignore")
// search for a .gitignore in the entire subtree
val gitIgnoreFullTree: Option[Path] = path.descendants ().find (_.name == ".gitignore")