[][src]Function fungus::sys::remove_all

pub fn remove_all<T: AsRef<Path>>(path: T) -> FuResult<()>

Removes the given directory after removing all of its contents. Handles path expansion. Does not follow symbolic links but rather removes the links themselves.

Examples

use fungus::prelude::*;

let tmpdir = PathBuf::from("tests/temp").abs().unwrap().mash("file_doc_remove_all");
assert!(sys::mkdir(&tmpdir).is_ok());
assert!(sys::remove_all(&tmpdir).is_ok());
assert_eq!(tmpdir.exists(), false);