MCPcopy Create free account
hub / github.com/xpipe-io/xpipe / toUnix

Method toUnix

core/src/main/java/io/xpipe/core/FilePath.java:221–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219 }
220
221 public FilePath toUnix() {
222 if (value.equals("/")) {
223 return this;
224 }
225
226 var joined = String.join("/", split());
227 var prefix = value.startsWith("/") ? "/" : "";
228 var suffix = value.endsWith("/") || value.endsWith("\\") ? "/" : "";
229 return FilePath.of(prefix + joined + suffix);
230 }
231
232 public FilePath toWindows() {
233 var suffix = value.endsWith("/") || value.endsWith("\\") ? "\\" : "";

Callers 10

normalizeMethod · 0.95
executeImplMethod · 0.80
executeImplMethod · 0.80
createListCommandMethod · 0.80
getDataDirMethod · 0.80
ofMethod · 0.80
serializeMethod · 0.80
renewMethod · 0.80
renewMethod · 0.80

Calls 5

splitMethod · 0.95
ofMethod · 0.95
startsWithMethod · 0.80
equalsMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected