commit | 554adc4abcf0cb86c48e09392e0954cb2bc38ff2 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Aug 31 01:05:45 2021 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Aug 31 01:05:45 2021 +0000 |
tree | cb03950958aa0e6190e987f65a4a8fb065f619ff | |
parent | 7faf15d272cd46017b92be5506ea3633942321ba [diff] | |
parent | b23bb64845ffe5561313e7225205bb7741c3049f [diff] |
Snap for 7688365 from b23bb64845ffe5561313e7225205bb7741c3049f to tm-d1-release Change-Id: Idab02ba67dd4348f607f1e7fa8feb4fcd5ee2955
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), } }