MCPcopy
hub / github.com/xpipe-io/xpipe / getExtension

Method getExtension

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

Source from the content-addressed store, hash-verified

138 }
139
140 public Optional<String> getExtension() {
141 var name = getFileName();
142 var split = name.split("\\.");
143 if (split.length < 2) {
144 return Optional.empty();
145 }
146 return Optional.of(split[split.length - 1]);
147 }
148
149 public FilePath join(String... parts) {
150 var joined = String.join("/", parts);

Callers

nothing calls this directly

Calls 4

getFileNameMethod · 0.95
splitMethod · 0.80
ofMethod · 0.65
emptyMethod · 0.45

Tested by

no test coverage detected