OxL Справочник OxL
РусскийEnglish

method fs.removeAll

Removes a file or a whole directory tree (symbolic links are removed, not followed). A missing path is NotFound.

Example:

oxl✓ проверяется в CI
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

Параметры

ИмяТип
pathstr

Возвращает

()

Ошибки

Эффекты

io

Определено в: std/io/io.oxl:734

См. также