MCPcopy Create free account
hub / github.com/BaseXdb/basex / merge

Method merge

basex-core/src/main/java/org/basex/io/IO.java:249–261  ·  view source on GitHub ↗

Merges two paths. @param path path to be merged @return resulting reference

(final String path)

Source from the content-addressed store, hash-verified

247 * @return resulting reference
248 */
249 public final IO merge(final String path) {
250 if(path.isEmpty()) return this;
251 final IO io = get(path);
252 if(io.isAbsolute()) return io;
253 if(IOUrl.isJarURL(pth)) {
254 try {
255 return get(new URL(new URL(pth), path).toString());
256 } catch(final MalformedURLException ex) {
257 Util.stack(ex);
258 }
259 }
260 return get((Strings.endsWith(pth, '/') ? pth : dir()) + path);
261 }
262
263 /**
264 * Checks if this file is an archive.

Callers 3

resolveMethod · 0.95
initMethod · 0.45
assignMethod · 0.45

Calls 8

getMethod · 0.95
isAbsoluteMethod · 0.95
isJarURLMethod · 0.95
stackMethod · 0.95
endsWithMethod · 0.95
dirMethod · 0.95
toStringMethod · 0.65
isEmptyMethod · 0.45

Tested by

no test coverage detected