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

Method removeTrailingSlash

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

Source from the content-addressed store, hash-verified

94 }
95
96 public FilePath removeTrailingSlash() {
97 if (value.equals("/") || value.equals("\\")) {
98 return FilePath.of(value);
99 }
100
101 if (value.endsWith("/") || value.endsWith("\\")) {
102 return FilePath.of(value.substring(0, value.length() - 1));
103 }
104 return FilePath.of(value);
105 }
106
107 public String getFileName() {
108 var split = split();

Callers 6

hashCodeMethod · 0.80
equalsMethod · 0.80
startsWithMethod · 0.80
executeImplMethod · 0.80
updateRecentMethod · 0.80
renameFileMethod · 0.80

Calls 2

ofMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected