MCPcopy
hub / github.com/upstash/context7 / scanDir

Function scanDir

packages/cli/src/commands/skill.ts:668–675  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

666
667 // Helper to scan a skills directory
668 async function scanDir(dir: string): Promise<string[]> {
669 try {
670 const entries = await readdir(dir, { withFileTypes: true });
671 return entries.filter((e) => e.isDirectory() || e.isSymbolicLink()).map((e) => e.name);
672 } catch {
673 return [];
674 }
675 }
676
677 if (hasExplicitIdeOption(options)) {
678 // Explicit flag mode — check the specific IDE paths

Callers 1

listCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected