#filesystem #remove #rm

rm_rf

Remove directory (–force)

7 releases

✓ Uses Rust 2018 edition

0.2.4 Apr 5, 2019
0.2.3 Mar 25, 2019
0.2.2 Nov 27, 2018
0.1.1 Nov 11, 2018

#76 in Filesystem

Download history 33/week @ 2018-12-21 21/week @ 2018-12-28 52/week @ 2019-01-04 25/week @ 2019-01-11 25/week @ 2019-01-18 21/week @ 2019-01-25 14/week @ 2019-02-01 26/week @ 2019-02-08 20/week @ 2019-02-15 12/week @ 2019-02-22 30/week @ 2019-03-01 15/week @ 2019-03-08 4/week @ 2019-03-15 70/week @ 2019-03-22 13/week @ 2019-03-29

106 downloads per month
Used in 1 crate

MIT OR Apache-2.0 OR CC0-1.0

5KB
86 lines

TimePlot Build Status crates.io

rm -rf

Force-removes a file/directory and all descendants.

In contrast to std::fs::remove_dir_all, it will remove empty directories that lack read access on Linux, and will remove "read-only" files and directories on Windows.

Usage

extern crate rm_rf;

fn main() {
    // Failure may still happen, in situations identical to where `rm -rf` would fail.
    rm_rf::force_remove_all("target", true).expect("Failed to remove file/directory");
}

Other

Licensed as (at your choice): MIT, Apache2 and CC0 ("public domain").

Dependencies

~1MB