MCPcopy Index your code
hub / github.com/codeaashu/claude-code / listDir

Function listDir

mcp-server/src/server.ts:53–62  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

51}
52
53async function listDir(dir: string): Promise<string[]> {
54 try {
55 const entries = await fs.readdir(dir, { withFileTypes: true });
56 return entries
57 .map((e) => (e.isDirectory() ? e.name + "/" : e.name))
58 .sort();
59 } catch {
60 return [];
61 }
62}
63
64async function walkFiles(root: string, rel = ""): Promise<string[]> {
65 const results: string[] = [];

Callers 3

getToolListFunction · 0.85
getCommandListFunction · 0.85
createServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected