MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / walk

Function walk

apps/kimi-code/scripts/native/web-assets.mjs:27–39  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

25 const files = [];
26
27 async function walk(dir) {
28 const entries = await readdir(dir, { withFileTypes: true });
29 for (const entry of entries) {
30 const path = join(dir, entry.name);
31 if (entry.isDirectory()) {
32 await walk(path);
33 continue;
34 }
35 if (entry.isFile()) {
36 files.push(path);
37 }
38 }
39 }
40
41 await walk(root);
42 return files;

Callers 1

listFilesFunction · 0.70

Calls 2

readdirFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected