commit | cf13993927cfa3d1e86f2d684d37a1da8461964d | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Tue Aug 24 19:56:34 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Aug 24 19:56:34 2021 +0000 |
tree | 48a09383f4b68424346329b485a790044acc4733 | |
parent | 34b2a1fc483b0375845b8859b8f7a5acf57fbae1 [diff] | |
parent | c59747010f937f4023381d24bdcae7068b478d68 [diff] |
Update TEST_MAPPING am: c9dd31e910 am: 4e51d43d90 am: 9e8b343caf am: c59747010f Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/glob/+/1806176 Change-Id: I959492254f77e26c7a1dc3a2d5aecc0ca0b8fffe
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), } }