MCPcopy Create free account
hub / github.com/questdb/questdb / walk

Method walk

core/src/main/java/io/questdb/std/Files.java:597–618  ·  view source on GitHub ↗
(Path path, FindVisitor func)

Source from the content-addressed store, hash-verified

595 }
596
597 public static void walk(Path path, FindVisitor func) {
598 int len = path.size();
599 long p = findFirst(path.$());
600 if (p > 0) {
601 try {
602 do {
603 long name = findName(p);
604 if (notDots(name)) {
605 int type = findType(p);
606 path.trimTo(len);
607 if (type == Files.DT_FILE) {
608 func.onFind(name, type);
609 } else {
610 walk(path.concat(name), func);
611 }
612 }
613 } while (findNext(p) > 0);
614 } finally {
615 findClose(p);
616 }
617 }
618 }
619
620 public static long write(long fd, long address, long len, long offset) {
621 return write(toOsFd(fd), address, len, offset);

Callers 5

filesMethod · 0.95
walkMethod · 0.95
tearDownMethod · 0.95
tearDownMethod · 0.95

Calls 11

findFirstMethod · 0.95
findNameMethod · 0.95
notDotsMethod · 0.95
findTypeMethod · 0.95
findNextMethod · 0.95
findCloseMethod · 0.95
onFindMethod · 0.80
concatMethod · 0.80
sizeMethod · 0.65
$Method · 0.65
trimToMethod · 0.65

Tested by 1

filesMethod · 0.76