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

Function scanFiles

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

Source from the content-addressed store, hash-verified

11}
12
13function scanFiles(dir: string, out: string[]): void {
14 if (!existsSync(dir)) return
15 for (const entry of readdirSync(dir, { withFileTypes: true })) {
16 const fullPath = join(dir, entry.name)
17 if (entry.isDirectory()) {
18 scanFiles(fullPath, out)
19 continue
20 }
21 if (['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'].includes(extname(entry.name))) {
22 out.push(fullPath)
23 }
24 }
25}
26
27function hasResolvableTarget(basePath: string): boolean {
28 const withoutJs = basePath.replace(/\.js$/u, '')

Callers 1

Calls 2

existsSyncFunction · 0.90
readdirSyncFunction · 0.90

Tested by

no test coverage detected