Class RelativePathWriter

java.lang.Object
nl.knaw.dans.bagit.writer.RelativePathWriter

public final class RelativePathWriter extends Object
Convenience class for writing a relative path
  • Constructor Details

    • RelativePathWriter

      private RelativePathWriter()
  • Method Details

    • formatRelativePathString

      public static String formatRelativePathString(Path relativeTo, Path entry)
      Create a relative path that has \ (windows) path separator replaced with / and encodes newlines
      Parameters:
      relativeTo - the path to remove from the entry
      entry - the path to make relative
      Returns:
      the relative path with only unix path separator