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

Function listFiles

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

Source from the content-addressed store, hash-verified

42}
43
44async function listFiles(root) {
45 const files = [];
46
47 async function walk(dir) {
48 const entries = await readdir(dir, { withFileTypes: true });
49 for (const entry of entries) {
50 const path = join(dir, entry.name);
51 if (entry.isDirectory()) {
52 await walk(path);
53 continue;
54 }
55 if (entry.isFile()) {
56 files.push(path);
57 }
58 }
59 }
60
61 await walk(root);
62 return files;
63}
64
65function resolvePackageRootGeneric(requireFromApp, packageName, parentPackageName, appRoot, target) {
66 try {

Callers 1

collectPackageFilesFunction · 0.70

Calls 1

walkFunction · 0.70

Tested by

no test coverage detected