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)!
}Вывод
true
pub(api) static fn tempDir(prefix: str = "oxl-") -> str | IoError ioС версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
prefix | str = "oxl-" |
Возвращает
str
Ошибки
IoError@error
Эффекты
io
Определено в: std/io/io.oxl:790