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

Method applicationDir

basex-core/src/main/java/org/basex/util/Prop.java:135–144  ·  view source on GitHub ↗

Returns the application directory. @param location location of application (can be null) @return application directory (can be null)

(final URL location)

Source from the content-addressed store, hash-verified

133 * @return application directory (can be {@code null})
134 */
135 private static String applicationDir(final URL location) {
136 try {
137 if(location != null && "file".equals(location.getProtocol())) {
138 return new IOFile(Paths.get(location.toURI()).toString()).dir();
139 }
140 } catch(final Exception ex) {
141 Util.stack(ex);
142 }
143 return null;
144 }
145
146 /**
147 * Attaches a directory separator to the specified directory string.

Callers 1

PropClass · 0.95

Calls 5

stackMethod · 0.95
toStringMethod · 0.65
getMethod · 0.65
equalsMethod · 0.45
dirMethod · 0.45

Tested by

no test coverage detected