[−][src]Function trash::remove_all
pub fn remove_all<I, T>(paths: I) -> Result<(), Error> where
I: IntoIterator<Item = T>,
T: AsRef<Path>,
Removes all files/directories specified by the collection of paths provided as an argument.
Example
extern crate trash; use std::fs::File; use trash::remove_all; File::create("remove_me_1").unwrap(); File::create("remove_me_2").unwrap(); remove_all(&["remove_me_1", "remove_me_2"]).unwrap(); assert!(File::open("remove_me_1").is_err()); assert!(File::open("remove_me_2").is_err());