MCPcopy Create free account
hub / github.com/SethGammon/Citadel / walk

Function walk

scripts/unharness.js:118–123  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

116}
117
118function countFiles(dir) {
119 if (!fs.existsSync(dir)) return 0;
120 let count = 0;
121 function walk(d) {
122 for (const entry of fs.readdirSync(d, { withFileTypes: true })) {
123 if (entry.isDirectory()) walk(path.join(d, entry.name));
124 else count++;
125 }
126 }

Callers 1

countFilesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected