commit | fc6b9ac6b5906cd49d05f113f89b258c1e06cf4a | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Sun Jan 15 12:06:19 2023 -0800 |
committer | Linux Build Service Account <lnxbuild@localhost> | Sun Jan 15 12:06:19 2023 -0800 |
tree | 04e1f5beb84a6589374bc4dc670374327c99f50a | |
parent | 643b512e66b5c4378fdac64e3dd50bfaa58b3329 [diff] | |
parent | eb870296c565b1b46ace34e16657a23fd4d2896b [diff] |
Merge eb870296c565b1b46ace34e16657a23fd4d2896b on remote branch Change-Id: I84f1a13eacc63ab7846d5a66a19c54513307a940
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), } }