Class PathOperations

Object
org.anchoranalysis.plugin.io.file.copy.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 org.anchoranalysis.core.system.path.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:
      org.anchoranalysis.core.system.path.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.