commit | 3d9b9a7df1ddb44673d17298acf616a2cbf826cd | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Tue Aug 25 20:49:18 2020 -0700 |
committer | Chih-Hung Hsieh <chh@google.com> | Tue Aug 25 20:49:18 2020 -0700 |
tree | e4074df0e16035f8abc1ebcb4bcf8c532c2ae338 | |
parent | 31b227d4a6f95ffc19531350916fe263556c152a [diff] |
Fix glob/METADATA Bug: 166324735 Test: make Change-Id: I05e268fef7991be322ac58047eba48885cf2b849
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), } }