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

Function listFiles

apps/kimi-code/scripts/native/web-assets.mjs:24–43  ·  view source on GitHub ↗
(root)

Source from the content-addressed store, hash-verified

22}
23
24async function listFiles(root) {
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;
43}
44
45async function assertBuiltAssetRoot({ assetRoot, requiredFile, message }) {
46 const requiredPath = join(assetRoot, requiredFile);

Callers 1

collectAssetRootFunction · 0.70

Calls 1

walkFunction · 0.70

Tested by

no test coverage detected