MCPcopy Create free account
hub / github.com/github/awesome-copilot / countFiles

Function countFiles

eng/clean-materialized-plugins.mjs:92–102  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

90}
91
92function countFiles(dir) {
93 let count = 0;
94 for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
95 if (entry.isDirectory()) {
96 count += countFiles(path.join(dir, entry.name));
97 } else {
98 count++;
99 }
100 }
101 return count;
102}
103
104function collectFiles(dir, rootDir = dir) {
105 const files = [];

Callers 1

cleanPluginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected