commit | 8e5d7b141df706da8a328e74dbb80ee98a2e29a6 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Thu Aug 27 23:47:18 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Aug 27 23:47:18 2020 +0000 |
tree | e4074df0e16035f8abc1ebcb4bcf8c532c2ae338 | |
parent | 35c3d7eaddc477e8a41f38f3f0c89ee10c132a12 [diff] | |
parent | 1d1683abfd5ad3679824643ee234dedfe0631b18 [diff] |
Fix glob/METADATA am: 3d9b9a7df1 am: 1baba24172 am: b7123e1c20 am: 1d1683abfd Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/glob/+/1413676 Change-Id: Ied78ba5e64449bd19569589cf9315a98ba6f1cc5
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), } }