(path, options)
| 353 | ) |
| 354 | |
| 355 | const readDirectory: FileSystem.FileSystem["readDirectory"] = (path, options) => { |
| 356 | if (options?.recursive) { |
| 357 | return Effect.map( |
| 358 | collectAsyncIterable("readDirectory", path, () => walk(path)), |
| 359 | (entries) => entries.map((entry) => relative(path, entry.path)).filter(Boolean) |
| 360 | ) |
| 361 | } |
| 362 | return Effect.map( |
| 363 | collectAsyncIterable("readDirectory", path, () => Deno.readDir(path)), |
| 364 | (entries) => entries.map((entry) => entry.name) |
| 365 | ) |
| 366 | } |
| 367 | |
| 368 | const readFile: FileSystem.FileSystem["readFile"] = (path) => |
| 369 | tryPromise("readFile", path, (signal) => Deno.readFile(path, { signal })) |
nothing calls this directly
no test coverage detected