commit | 6d1878a2efef95f50129e52664d92b2670b28844 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Thu Nov 05 16:21:38 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Nov 05 16:21:38 2020 +0000 |
tree | f82ddf1f6eb37018bd1ac1010b4842833c5ad644 | |
parent | fc852f6e28245015534e5f5dd10410fb09d23268 [diff] | |
parent | 560831505850a4808ea7781ad2a4ea337dd49718 [diff] |
TEST_MAPPING: test dependers of this crate am: 5608315058 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/glob/+/1488749 Change-Id: I37d3b53e0843eac8e8d159f8e661caaa53f73a10
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), } }