MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / listDirs

Function listDirs

packages/plugins/mcp/src/sdk/codex-plugins.ts:178–186  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

176};
177
178const listDirs = (dir: string): readonly string[] =>
179 tryOrElse(
180 () =>
181 fs
182 .readdirSync(dir, { withFileTypes: true })
183 .filter((entry) => entry.isDirectory())
184 .map((entry) => entry.name),
185 [],
186 );
187
188const readText = (file: string): string | undefined =>
189 tryOrElse(() => fs.readFileSync(file, "utf-8"), undefined);

Callers 3

curatedDisplayMetadataFunction · 0.85
scanCachedPluginFunction · 0.85
scanCodexPluginsFunction · 0.85

Calls 1

tryOrElseFunction · 0.85

Tested by

no test coverage detected