MCPcopy Create free account
hub / github.com/Effect-TS/effect / readDirectory

Function readDirectory

packages/effect/test/FileSystem.test.ts:44–48  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

42}) => {
43 const directories = overrides.directories ?? { ".": ["a"], "a": ["x.ts"] }
44 const readDirectory = (path: string) =>
45 overrides.readDirectory?.(path) ??
46 (path in directories
47 ? Effect.succeed([...directories[path]])
48 : Effect.fail(failure("NotFound", "readDirectory", path)))
49 return FileSystem.make({
50 ...FileSystem.makeNoop({}),
51 readDirectory,

Callers 1

makeFileSystemFunction · 0.70

Calls 3

failureFunction · 0.70
failMethod · 0.65
succeedMethod · 0.45

Tested by

no test coverage detected