method fs.tempDir
A new empty private directory below $TMPDIR (default /tmp) named prefixXXXXXX; the caller removes it.
Example:
use std.io { File, fs }
fn main() io {
let dir = fs.tempDir("demo-")!
print("{File.isDir(dir)}")
fs.removeAll(dir)!
}Output
true
pub(api) static fn tempDir(prefix: str = "oxl-") -> str | IoError ioSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
prefix | str = "oxl-" |
Returns
str
Errors
IoError@error
Effects
io
Defined in: std/io/io.oxl:790