Class PathFinder

java.lang.Object
io.nosqlbench.nb.api.content.PathFinder

public class PathFinder
extends java.lang.Object
A central API for finding and accessing Paths which are either in the classpath or in the file system, or both.
  • Constructor Summary

    Constructors 
    Constructor Description
    PathFinder()  
  • Method Summary

    Modifier and Type Method Description
    static java.util.Optional<java.nio.file.Path> find​(java.lang.String... names)
    Find exactly zero or one matching Paths, and return an Optional of Path.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • find

      public static java.util.Optional<java.nio.file.Path> find​(java.lang.String... names)
      Find exactly zero or one matching Paths, and return an Optional of Path. Or, if more than one are found, throw a basic error.
      Parameters:
      names - The names of paths to find, with tailing slashes signifying directories
      Returns:
      An optional Path
      Throws:
      BasicError - if there is more than one matching path found.