MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / walk

Function walk

scripts/add-internal-links.mjs:221–230  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

219// ── Walk directories ─────────────────────────────────────────────────
220
221function walk(dir) {
222 const entries = fs.readdirSync(dir, { withFileTypes: true });
223 const files = [];
224 for (const e of entries) {
225 const full = path.join(dir, e.name);
226 if (e.isDirectory()) files.push(...walk(full));
227 else if (e.name.endsWith('.mdx')) files.push(full);
228 }
229 return files;
230}
231
232// ── Main ─────────────────────────────────────────────────────────────
233

Callers 1

Calls 2

joinMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected