| commit | 5a52dc73c6f2a699b78e21ea0c77bec184131e6d | [log] [tgz] |
|---|---|---|
| author | Ted Bauer <tedbauer@google.com> | Wed Mar 27 21:15:47 2024 +0000 |
| committer | Ted Bauer <tedbauer@google.com> | Wed Mar 27 22:13:06 2024 +0000 |
| tree | ed625d58145dc3ca6b41f74bc6b7f9e6561a9b78 | |
| parent | cb3bc26de85e1953e6d02c509fd78c2df5d2effb [diff] |
Make crate apex-available This dependency should be usable on any mainline module, so set it to the lowest possible min_sdk_version. Bug: 328444881 Test: m Change-Id: I4751e2ffe43365b4530296c7b30e4ecebb030b62
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.