commit | 1baba24172dd7a67c2ca02e608810d3fbd550acc | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Thu Aug 27 21:50:32 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Aug 27 21:50:32 2020 +0000 |
tree | e4074df0e16035f8abc1ebcb4bcf8c532c2ae338 | |
parent | 073cbe1e0b9d5852f72479d46eadc41489cecd67 [diff] | |
parent | 3d9b9a7df1ddb44673d17298acf616a2cbf826cd [diff] |
Fix glob/METADATA am: 3d9b9a7df1 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/glob/+/1413676 Change-Id: Ia20bebc70d186b6eea9fab62f2cef2c8e4b5d969
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), } }