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

Method dbSize

basex-core/src/main/java/org/basex/data/MetaData.java:216–224  ·  view source on GitHub ↗

Calculates the database size. @param file current file @return file length

(final IOFile file)

Source from the content-addressed store, hash-verified

214 * @return file length
215 */
216 private static long dbSize(final IOFile file) {
217 long s = 0;
218 if(file.isDir()) {
219 for(final IOFile f : file.children()) s += dbSize(f);
220 } else {
221 s += file.length();
222 }
223 return s;
224 }
225
226 /**
227 * Creates a database file.

Callers 5

listMethod · 0.95
getMethod · 0.95
dbMethod · 0.80
valueMethod · 0.80
initMethod · 0.80

Calls 3

isDirMethod · 0.45
childrenMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected