MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / scanDir

Function scanDir

src/lib/skill-parser.ts:119–130  ·  view source on GitHub ↗
(dir: string, prefix: string = '')

Source from the content-addressed store, hash-verified

117 const files: string[] = [];
118
119 function scanDir(dir: string, prefix: string = '') {
120 const entries = fs.readdirSync(dir, { withFileTypes: true });
121 for (const entry of entries) {
122 if (entry.name.startsWith('.')) continue;
123 const relativePath = prefix ? `${prefix}/${entry.name}` : entry.name;
124 if (entry.isDirectory()) {
125 scanDir(path.join(dir, entry.name), relativePath);
126 } else {
127 files.push(relativePath);
128 }
129 }
130 }
131
132 scanDir(skillPath);
133 return { count: files.length, files };

Callers 1

countFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected