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