frc_340819010 (10586669,com.google.android.adbd,com.google.android.adservices,com.google.android.appsearch,com.google.android.captiveportallogin,com.google.android.configinfrastructure,com.google.android.conscrypt,com.google.android.documentsui,com.google.android.ext.services,com.google.android.extservices,com.google.android.go.adbd,com.google.android.go.adservices,com.google.android.go.appsearch,com.google.android.go.captiveportallogin,com.google.android.go.configinfrastructure,com.google.android.go.conscrypt,com.google.android.go.documentsui,com.google.android.go.extservices,com.google.android.go.ipsec,com.google.android.go.mediaprovider,com.google.android.go.networkstack,com.google.android.go.neuralnetworks,com.google.android.go.ondevicepersonalization,com.google.android.go.os.statsd,com.google.android.go.resolv,com.google.android.go.rkpd,com.google.android.go.scheduling,com.google.android.go.sdkext,com.google.android.go.tethering,com.google.android.go.tzdata5,com.google.android.go.uwb,com.google.android.go.wifi,com.google.android.ipsec,com.google.android.networkstack,com.google.android.neuralnetworks,com.google.android.ondevicepersonalization,com.google.android.os.statsd,com.google.android.resolv,com.google.android.rkpd,com.google.android.scheduling,com.google.android.sdkext,com.google.android.tethering,com.google.android.tzdata5,com.google.android.uwb,com.google.android.wifi)
Snap for 10078606 from 2b88d7a2b95044b1124da42abab973c5dde1fa48 to aml-frc-release

Change-Id: I64e9e152ab695231a0e263b6144e5c568f5a1c49
tree: 19ec511c161688814e81cad63f7a2fe8d235bb0f
  1. src/
  2. tests/
  3. Android.bp
  4. Cargo.toml
  5. cargo2android.json
  6. CHANGELOG.md
  7. LICENCE-APACHE
  8. LICENCE-MIT
  9. METADATA
  10. MODULE_LICENSE_APACHE
  11. OWNERS
  12. README.md
  13. TEST_MAPPING
README.md

remove_dir_all

Latest Version Docs License

Description

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();
}

Minimum Rust Version

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.