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 class  NBIOWalker.CollectVisitor  
    static class  NBIOWalker.PathSuffixFilter  
    static interface  NBIOWalker.PathVisitor  
    static class  NBIOWalker.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 void walk​(java.nio.file.Path p, NBIOWalker.PathVisitor v)  
    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)  
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • WALK_ALL

      public static java.nio.file.DirectoryStream.Filter<java.nio.file.Path> WALK_ALL
  • Constructor Details

  • Method Details

    • walk

      public static void walk​(java.nio.file.Path p, NBIOWalker.PathVisitor v)
    • 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 search
      v - The visitor to accumulate or operate on matched paths and all directories
      filter - 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 search
      v - The visitor to accumulate or operate on matched paths and all directories
      filter - 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)