OxL Reference

method fs.removeAll

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

Example:

oxl✓ checked in 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)}")
}
Output
false
pub(api) static fn removeAll(path: str) -> () | IoError  io

Since. 1.0.0-beta

Parameters

NameType
pathstr

Returns

()

Errors

Effects

io

Defined in: std/io/io.oxl:728

See also