Package io.nosqlbench.nb.api.content
Class NBIOWalker
java.lang.Object
io.nosqlbench.nb.api.content.NBIOWalker
public class NBIOWalker
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNBIOWalker.CollectVisitorstatic classNBIOWalker.PathSuffixFilterstatic interfaceNBIOWalker.PathVisitorstatic classNBIOWalker.RegexFilter -
Field Summary
Fields Modifier and Type Field Description static java.nio.file.DirectoryStream.Filter<java.nio.file.Path>WALK_ALL -
Constructor Summary
Constructors Constructor Description NBIOWalker() -
Method Summary
Modifier and Type Method Description static java.util.List<java.nio.file.Path>findAll(java.nio.file.Path p)static voidwalk(java.nio.file.Path p, NBIOWalker.PathVisitor v)static voidwalk(java.nio.file.Path root, java.nio.file.Path p, NBIOWalker.PathVisitor v, java.nio.file.DirectoryStream.Filter<java.nio.file.Path> filter, boolean fullpath)static voidwalkFullPath(java.nio.file.Path p, NBIOWalker.PathVisitor v, java.nio.file.DirectoryStream.Filter<java.nio.file.Path> filter)This walks the directory structure starting at the path specified.static voidwalkShortPath(java.nio.file.Path p, NBIOWalker.PathVisitor v, java.nio.file.DirectoryStream.Filter<java.nio.file.Path> filter)This walks the directory structure starting at the path specified.
-
Field Details
-
WALK_ALL
public static java.nio.file.DirectoryStream.Filter<java.nio.file.Path> WALK_ALL
-
-
Constructor Details
-
NBIOWalker
public NBIOWalker()
-
-
Method Details
-
walk
-
findAll
public static java.util.List<java.nio.file.Path> findAll(java.nio.file.Path p) -
walkShortPath
public static void walkShortPath(java.nio.file.Path p, NBIOWalker.PathVisitor v, java.nio.file.DirectoryStream.Filter<java.nio.file.Path> filter)This walks the directory structure starting at the path specified. The path visitor is invoked for every directory, and every non-directory which matches the filter. This form uses only the filename component in Paths to be matched by the filter, and the short name is also what is returned by the filter.- Parameters:
p- The path to searchv- The visitor to accumulate or operate on matched paths and all directoriesfilter- The Path filter to determine whether a path is included
-
walkFullPath
public static void walkFullPath(java.nio.file.Path p, NBIOWalker.PathVisitor v, java.nio.file.DirectoryStream.Filter<java.nio.file.Path> filter)This walks the directory structure starting at the path specified. The path visitor is invoked for every directory, and every non-directory which matches the filter. This form uses only the full path from the initial search path root in all Paths to be matched by the filter, and this form of a Path component is also returned in all Paths seen by the visitor.- Parameters:
p- The path to searchv- The visitor to accumulate or operate on matched paths and all directoriesfilter- The Path filter to determine whether a path is included
-
walk
public static void walk(java.nio.file.Path root, java.nio.file.Path p, NBIOWalker.PathVisitor v, java.nio.file.DirectoryStream.Filter<java.nio.file.Path> filter, boolean fullpath)
-