commit | dc82198a5c5d9e29324d1ca1129d57fa8b6bff33 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Thu Nov 05 17:29:19 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Nov 05 17:29:19 2020 +0000 |
tree | f82ddf1f6eb37018bd1ac1010b4842833c5ad644 | |
parent | d7b7bbb318035d3770015dc80fda7e7400048f66 [diff] | |
parent | 4cfe0bdd7f592208173bd0f1b4b7be00b691a0f0 [diff] |
TEST_MAPPING: test dependers of this crate am: 5608315058 am: 6d1878a2ef am: a2ec7dcecd am: 4cfe0bdd7f Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/glob/+/1488749 Change-Id: I4eb8825fbbe1db682bd0974bf3ca8c79aeaaba2a
Support for matching file paths against Unix shell style patterns.
To use glob
, add this to your Cargo.toml
:
[dependencies] glob = "0.3.0"
And add this to your crate root:
extern crate glob;
Print all jpg files in /media/ and all of its subdirectories.
use glob::glob; for entry in glob("/media/**/*.jpg").expect("Failed to read glob pattern") { match entry { Ok(path) => println!("{:?}", path.display()), Err(e) => println!("{:?}", e), } }