Class FileTreeWalker
java.lang.Object
software.xdev.testcontainers.imagebuilder.transfer.java.nio.file.winntfs.FileTreeWalker
- All Implemented Interfaces:
Closeable,AutoCloseable
Walks a file tree, generating a sequence of events corresponding to the files in the tree.
Path top = ...
Set<FileVisitOption> options = ...
int maxDepth = ...
try (FileTreeWalker walker = new FileTreeWalker(options, maxDepth)) {
FileTreeWalker.Event ev = walker.walk(top);
do {
process(ev);
ev = walker.next();
} while (ev != null);
}
- See Also:
-
Method Summary
-
Method Details
-
close
public void close()Closes/pops all directories on the stack.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-