MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / walk

Function walk

scripts/run-tests.mjs:29–40  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

27 const out = [];
28
29 function walk(d) {
30 const entries = listDirSorted(d);
31 for (const name of entries) {
32 const full = join(d, name);
33 const st = statSync(full);
34 if (st.isDirectory()) {
35 walk(full);
36 continue;
37 }
38 if (predicate(full)) out.push(full);
39 }
40 }
41
42 walk(dir);
43 out.sort();

Callers 1

Calls 2

listDirSortedFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected