commit | 935a5f5e3b2d30e7fdc4236e98c538edb12a179b | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Wed Feb 17 03:16:36 2021 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Wed Feb 17 03:16:36 2021 +0000 |
tree | 28ded3e268f7970c9b9a5b9e1dfed07c37063f29 | |
parent | 673c3055d670e15645af6e7bdc79e95d53f2979e [diff] | |
parent | cc1e1658467b873f13271a7000b595336be4d536 [diff] |
Snap for 7149879 from cc1e1658467b873f13271a7000b595336be4d536 to sc-v2-release Change-Id: I69c76875eca49a0b542db135f2dc4f89fd2d4fd4
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), } }