MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / walk

Function walk

Support/SingleFileLibs/javascript/cli.js:52–61  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

50function listFilesRecursive(root) {
51 const results = [];
52 function walk(dir) {
53 let names;
54 try { names = readdirSync(dir).sort(); } catch { return; }
55 for (const name of names) {
56 const full = join(dir, name);
57 let st;
58 try { st = statSync(full); } catch { continue; }
59 if (st.isDirectory()) walk(full); else results.push(full);
60 }
61 }
62 walk(root);
63 return results;
64}

Callers 1

listFilesRecursiveFunction · 0.85

Calls 3

isDirectoryMethod · 0.80
joinFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected