Static implementation of
FileSystemAbstraction#streamFilesRecursive(File) that does not require
any external state, other than what is presented through the given
FileSystemAbstraction.
Return a stream of
FileHandle for every file in the given directory, and its
sub-directories.
Alternatively, if the
File given as an argument refers to a file instead of a directory, then a stream
will be returned with a file handle for just that file.
The stream is based on a snapshot of the file tree, so changes made to the tree using the returned file handles
will not be reflected in the stream.
No directories will be returned. Only files. If a file handle ends up leaving a directory empty through a
rename or a delete, then the empty directory will automatically be deleted as well.
Likewise, if a file is moved to a path where not all of the directories in the path exists, then those missing
directories will be created prior to the file rename.