commit | 18b495a84b03f5ce3d81e3394ad764f0a1ad325f | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Wed Feb 17 03:16:37 2021 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Wed Feb 17 03:16:37 2021 +0000 |
tree | 28ded3e268f7970c9b9a5b9e1dfed07c37063f29 | |
parent | 3903d87aa1a36897cee422c79f5a098c151140f0 [diff] | |
parent | cc1e1658467b873f13271a7000b595336be4d536 [diff] |
Snap for 7149879 from cc1e1658467b873f13271a7000b595336be4d536 to sc-d1-release Change-Id: I4eb89f373b761fa7c6844811397a598d61371a5f
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), } }