Convert a file to a relative path using the "/" (forward slash) from the working directory, thus preserving the portability of the dumped options file. @param file the file to be processed @return a relative path from the working directory
(String file)
| 522 | * @return a relative path from the working directory |
| 523 | */ |
| 524 | private static String toSerializedFilePath(String file) { |
| 525 | Path workingDir = Path.of("").toAbsolutePath(); |
| 526 | Path path = Path.of(file).toAbsolutePath().normalize(); |
| 527 | return workingDir.relativize(path).toString() |
| 528 | .replace('\\', '/'); |
| 529 | } |
| 530 | |
| 531 | @Override |
| 532 | public String toString() { |