(path, options)
| 46 | }) |
| 47 | |
| 48 | const access: FileSystem.FileSystem["access"] = (path, options) => { |
| 49 | if (!options?.readable && !options?.writable) { |
| 50 | return Effect.asVoid(tryPromise("access", path, () => Deno.stat(path))) |
| 51 | } |
| 52 | return Effect.acquireUseRelease( |
| 53 | tryPromise("access", path, () => |
| 54 | Deno.open(path, { |
| 55 | ...(options.readable ? { read: true } : {}), |
| 56 | ...(options.writable ? { write: true } : {}) |
| 57 | })), |
| 58 | () => Effect.void, |
| 59 | (file) => close(file, "access", path) |
| 60 | ) |
| 61 | } |
| 62 | |
| 63 | const copy: FileSystem.FileSystem["copy"] = (fromPath, toPath, options) => |
| 64 | tryPromise("copy", fromPath, () => |
nothing calls this directly
no test coverage detected