MCPcopy Create free account
hub / github.com/LFYSec/MScan / toSerializedFilePath

Method toSerializedFilePath

src/main/java/pascal/taie/config/Options.java:524–529  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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() {

Callers 2

serializeMethod · 0.80
serializeMethod · 0.80

Calls 2

ofMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected