Class PathOperations

Object
PathOperations

public class PathOperations extends Object
Helper routines for performing operations on Paths.
Author:
Owen Feehan
  • Method Details

    • filePathDifference

      public static Path filePathDifference(Path baseDirectoryPath, Path filePath) throws PathDifferenceException
      Finds the difference between a path and a base.
      Parameters:
      baseDirectoryPath - path to a base directory.
      filePath - the path to resolve.
      Returns:
      the difference between the paths.
      Throws:
      PathDifferenceException - if the canonical file cannot be found.
    • convertToString

      public static String convertToString(Path path)
      Converts a path to a string, making sure it uses UNIX-style separators.
      Parameters:
      path - the path to convert.
      Returns:
      a converted path, with UNIX-style separators.