Class PathUtils

java.lang.Object
org.aksw.commons.io.util.PathUtils

public class PathUtils extends Object
  • Constructor Details

    • PathUtils

      public PathUtils()
  • Method Details

    • resolve

      public static Path resolve(Path basePath, String... segments)
    • resolve

      public static Path resolve(Path basePath, Iterable<String> segments)
    • getPathSegments

      public static String[] getPathSegments(Path path)
    • splitBySlash

      public static String[] splitBySlash(String str)
    • join

      public static String join(String... segments)
    • resolveFsAndPath

      public static Map.Entry<Path,Closeable> resolveFsAndPath(String fsUri, String pathStr) throws IOException
      Create a path on a (possibly remote) file system via Java nio.
      Parameters:
      fsUri - The url to a file system. Null or blank for the local one.
      pathStr - A path on the file system.
      Returns:
      A pair comprising the path and a close action which closes the underlying file system.
      Throws:
      IOException