public static Stream<Path> walk (Path start, FileVisitOption… options) throws IOException

Return a Stream that is lazily populated with Path by walking the file tree rooted at a given starting file. The file tree is traversed depth-first, the elements in the stream are Path objects that are obtained as if by resolving the relative path against start.

This method works as if invoking it were equivalent to evaluating the expression:

 walk(start, Integer.MAX_VALUE, options)
 
In other words, it visits all levels of the file tree.

The returned stream encapsulates one or more DirectoryStreams. If timely disposal of file system resources is required, the try-with-resources construct should be used to ensure that the stream's close method is invoked after the stream operations are completed. Operating on a closed stream will result in an java.lang.IllegalStateException.

Parameters:
start     the starting file
options     options to configure the traversal

Returns:  the Stream of Path

Exceptions:
SecurityException     If the security manager denies access to the starting file. In the case of the default provider, the checkRead method is invoked to check read access to the directory.
IOException     if an I/O error is thrown when accessing the starting file.

See also:
walk(Path, int, FileVisitOption...)

Since:  1.8