(method: string)
| 97 | const makeTempDirectory = makeTempDirectoryFactory("makeTempDirectory") |
| 98 | |
| 99 | const removeFactory = (method: string): FileSystem.FileSystem["remove"] => (path, options) => { |
| 100 | const effect = tryPromise(method, path, () => Deno.remove(path, { recursive: options?.recursive ?? false })) |
| 101 | return options?.force |
| 102 | ? Effect.catchTag( |
| 103 | effect, |
| 104 | "PlatformError", |
| 105 | (error) => error.reason._tag === "NotFound" ? Effect.void : Effect.fail(error) |
| 106 | ) |
| 107 | : effect |
| 108 | } |
| 109 | |
| 110 | const remove = removeFactory("remove") |
| 111 |
no test coverage detected