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

Function listDirs

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

Source from the content-addressed store, hash-verified

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