(method: string)
| 392 | // == makeTempFile |
| 393 | |
| 394 | const makeTempFileFactory = (method: string): FileSystem.FileSystem["makeTempFile"] => { |
| 395 | const makeDirectory = makeTempDirectoryFactory(method) |
| 396 | return Effect.fnUntraced(function*(options) { |
| 397 | const directory = yield* makeDirectory(options) |
| 398 | const random = Crypto.randomBytes(6).toString("hex") |
| 399 | const name = Path.join(directory, options?.suffix ? `${random}${options.suffix}` : random) |
| 400 | yield* writeFile(name, new Uint8Array(0)) |
| 401 | return name |
| 402 | }) |
| 403 | } |
| 404 | const makeTempFile = makeTempFileFactory("makeTempFile") |
| 405 | |
| 406 | // == makeTempFileScoped |
no test coverage detected