MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / sanitizeName

Method sanitizeName

src/main/java/fieldbox/io/IO.java:727–736  ·  view source on GitHub ↗
(File filename)

Source from the content-addressed store, hash-verified

725 f = f.replaceAll("\\?", "_query_");
726 f = f.replaceAll("\\*", "_star_");
727 f = f.replaceAll("\\:", "_colon_");
728 f = f.replaceAll("\\\\", "_backslash_");
729 f = f.replaceAll("\\/", "_slash_");
730 return new File(filename.getParent(), f);
731 }
732
733 public File filenameFor(String value) {
734 if (value.startsWith(TEMPLATES)) {
735 return new File(templateDirectory,
736 /*safe*/(value.substring(TEMPLATES.length())));
737 }
738 if (value.startsWith(WORKSPACE)) {
739 return new File(defaultDirectory,

Callers 3

readFromFileMethod · 0.95
writeToFileMethod · 0.95
filenameForMethod · 0.95

Calls 1

getNameMethod · 0.45

Tested by

no test coverage detected