(method: string)
| 105 | const makeTempDirectory = makeTempDirectoryFactory("makeTempDirectory") |
| 106 | |
| 107 | const removeFactory = (method: string): FileSystem.FileSystem["remove"] => (path, options) => { |
| 108 | const effect = tryPromise(method, path, () => Deno.remove(path, { recursive: options?.recursive ?? false })) |
| 109 | return options?.force |
| 110 | ? Effect.catchTag( |
| 111 | effect, |
| 112 | "PlatformError", |
| 113 | (error) => error.reason._tag === "NotFound" ? Effect.void : Effect.fail(error) |
| 114 | ) |
| 115 | : effect |
| 116 | } |
| 117 | |
| 118 | const remove = removeFactory("remove") |
| 119 |
no test coverage detected