(path, options)
| 362 | } |
| 363 | |
| 364 | const open: FileSystem.FileSystem["open"] = (path, options) => { |
| 365 | if (options?.noFollow === true) { |
| 366 | return Effect.fail(PlatformError.badArgument({ |
| 367 | module: "FileSystem", |
| 368 | method: "open", |
| 369 | description: "noFollow is not supported by Deno" |
| 370 | })) |
| 371 | } |
| 372 | const append = options?.flag?.startsWith("a") ?? false |
| 373 | return Effect.map( |
| 374 | Effect.acquireRelease( |
| 375 | tryPromise("open", path, () => Deno.open(path, openOptions(options?.flag, options?.mode))), |
| 376 | (file) => close(file, "open", path) |
| 377 | ), |
| 378 | (file) => new FileImpl(file, append) |
| 379 | ) |
| 380 | } |
| 381 | |
| 382 | const makeTempFileFactory = (method: string): FileSystem.FileSystem["makeTempFile"] => (options) => |
| 383 | tryPromise(method, options?.directory, () => |
no test coverage detected