commit | fc852f6e28245015534e5f5dd10410fb09d23268 | [log] [tgz] |
---|---|---|
author | Xin Li <delphij@google.com> | Thu Oct 08 17:21:30 2020 -0700 |
committer | Xin Li <delphij@google.com> | Thu Oct 08 17:21:30 2020 -0700 |
tree | e4074df0e16035f8abc1ebcb4bcf8c532c2ae338 | |
parent | 1baba24172dd7a67c2ca02e608810d3fbd550acc [diff] | |
parent | 59c49e6740d92c5428d7f52d5248c2fee3ce2e8f [diff] |
Skip ab/6749736 in stage. Merged-In: I7323604e34765a1da3fb858f25f562c552805ee2 Change-Id: I73b27e8390fac52bd0db5248e767ad3272c82155
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), } }