MCPcopy Create free account
hub / github.com/QuantaAlpha/claude-code / scanFiles

Function scanFiles

src/dev-entry.ts:36–48  ·  view source on GitHub ↗
(dir: string, out: string[])

Source from the content-addressed store, hash-verified

34}
35
36function scanFiles(dir: string, out: string[]): void {
37 if (!existsSync(dir)) return
38 for (const entry of readdirSync(dir, { withFileTypes: true })) {
39 const fullPath = join(dir, entry.name)
40 if (entry.isDirectory()) {
41 scanFiles(fullPath, out)
42 continue
43 }
44 if (['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'].includes(extname(entry.name))) {
45 out.push(fullPath)
46 }
47 }
48}
49
50function hasResolvableTarget(basePath: string): boolean {
51 const withoutJs = basePath.replace(/\.js$/u, '')

Callers 1

Calls 2

existsSyncFunction · 0.90
readdirSyncFunction · 0.90

Tested by

no test coverage detected