Package nl.knaw.dans.bagit.writer
Class RelativePathWriter
java.lang.Object
nl.knaw.dans.bagit.writer.RelativePathWriter
Convenience class for writing a relative path
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
formatRelativePathString
(Path relativeTo, Path entry) Create a relative path that has \ (windows) path separator replaced with / and encodes newlines
-
Constructor Details
-
RelativePathWriter
private RelativePathWriter()
-
-
Method Details
-
formatRelativePathString
Create a relative path that has \ (windows) path separator replaced with / and encodes newlines- Parameters:
relativeTo
- the path to remove from the entryentry
- the path to make relative- Returns:
- the relative path with only unix path separator
-