#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

#79 in Filesystem

Download history 23/week @ 2019-01-22 14/week @ 2019-01-29 21/week @ 2019-02-05 26/week @ 2019-02-12 13/week @ 2019-02-19 25/week @ 2019-02-26 22/week @ 2019-03-05 7/week @ 2019-03-12 15/week @ 2019-03-19 63/week @ 2019-03-26 32/week @ 2019-04-02 23/week @ 2019-04-09 24/week @ 2019-04-16 24/week @ 2019-04-23 40/week @ 2019-04-30

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