| commit | fa1414e547586e583f3edb32769df576599100dc | [log] [tgz] |
|---|---|---|
| author | Maxim Pleshivenkov <[email protected]> | Wed Jul 02 18:41:15 2025 +0000 |
| committer | Maxim Pleshivenkov <[email protected]> | Wed Jul 02 18:41:15 2025 +0000 |
| tree | d15fd41349e4bfaf97a54e54aac9abdfaf1a76f1 | |
| parent | 2a831f6cf071af9628cd114cfdd610686c1677c9 [diff] | |
| parent | 35a6f1e50fe07a6de18de83e5af60baa874d65bc [diff] |
Merge goog/stage-aosp-security-aosp-24Q3-release to internal-android15-automotiveos-dev Bug: 428987018 Test: presubmit Merged-In: Change-Id: Ida72739a6e6d2e0d0bd6dca1d21e2743630abdd9
Reliable and fast directory removal functions.
remove_dir_all - on non-Windows this is a re-export of std::fs::remove_dir_all. For Windows an implementation that handles the locking of directories that occurs when deleting directory trees rapidly.
remove_dir_contents - as for remove_dir_all but does not delete the supplied root directory.
ensure_empty_dir - as for remove_dir_contents but will create the directory if it does not exist.
extern crate remove_dir_all; use remove_dir_all::*; fn main() { remove_dir_all("./temp/").unwrap(); remove_dir_contents("./cache/").unwrap(); }
The minimum rust version for remove_dir_all is the latest stable release, and the minimum version may be bumped through patch releases. You can pin to a specific version by setting by add = to your version (e.g. =0.6.0), or commiting a Cargo.lock file to your project.