method fs.removeAll
Removes a file or a whole directory tree (symbolic links are removed, not followed). A missing path is NotFound.
Example:
use std.io { File, fs }
fn main() io {
let dir = fs.tempDir()!
fs.createDirAll("{dir}/a/b")!
fs.removeAll(dir)!
print("{File.exists(dir)}")
}Вывод
false
pub(api) static fn removeAll(path: str) -> () | IoError ioС версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
path | str |
Возвращает
()
Ошибки
IoError@error
Эффекты
io
Определено в: std/io/io.oxl:734