tag | f0ce8d7a71708a289071664cae5a10896b498631 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Feb 01 16:52:03 2023 -0800 |
object | 199449ffcd4497794249f1f9e6ff1b56ef885b4a |
Platform Tools Release 33.0.4 (9550387)
commit | 199449ffcd4497794249f1f9e6ff1b56ef885b4a | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Feb 01 11:02:17 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Feb 01 11:02:17 2023 +0000 |
tree | be8e444a459791e1d5e5efbe4e90cb4bd775346c | |
parent | f94374dbb1f1211260fe0905885e66a055522d23 [diff] | |
parent | dea90528c3dc7b23a363625be1d3944d3eb5ce51 [diff] |
Snap for 9550355 from dea90528c3dc7b23a363625be1d3944d3eb5ce51 to sdk-release Change-Id: I256f1257f211f9dd105505c1649d372064228ee8
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.