(path, options)
| 396 | ) |
| 397 | |
| 398 | const readDirectory: FileSystem.FileSystem["readDirectory"] = (path, options) => { |
| 399 | if (options?.recursive) { |
| 400 | return Effect.map( |
| 401 | collectAsyncIterable("readDirectory", path, () => walk(path)), |
| 402 | (entries) => entries.map((entry) => relative(path, entry.path)).filter(Boolean) |
| 403 | ) |
| 404 | } |
| 405 | return Effect.map( |
| 406 | collectAsyncIterable("readDirectory", path, () => Deno.readDir(path)), |
| 407 | (entries) => entries.map((entry) => entry.name) |
| 408 | ) |
| 409 | } |
| 410 | |
| 411 | const readDirectoryEntries = (path: string) => |
| 412 | Effect.map( |
nothing calls this directly
no test coverage detected