(method: string)
| 498 | // == makeTempFile |
| 499 | |
| 500 | const makeTempFileFactory = (method: string): FileSystem.FileSystem["makeTempFile"] => { |
| 501 | const makeDirectory = makeTempDirectoryFactory(method) |
| 502 | return Effect.fnUntraced(function*(options) { |
| 503 | const directory = yield* makeDirectory(options) |
| 504 | const random = Crypto.randomBytes(6).toString("hex") |
| 505 | const name = Path.join(directory, options?.suffix ? `${random}${options.suffix}` : random) |
| 506 | yield* writeFile(name, new Uint8Array(0)) |
| 507 | return name |
| 508 | }) |
| 509 | } |
| 510 | const makeTempFile = makeTempFileFactory("makeTempFile") |
| 511 | |
| 512 | // == makeTempFileScoped |
no test coverage detected