commit | c30921ca8699c6b28e030bfe5e68a92b54c847ae | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Dec 16 02:07:04 2021 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Dec 16 02:07:04 2021 +0000 |
tree | e85631ff712359653621edf9e70654f8168f0e9c | |
parent | 023489448c43f554cc064db46c6fed9262339913 [diff] | |
parent | 0b9ee10917e5465f7a217f0bf5b44909b160a299 [diff] |
Snap for 8006021 from 0b9ee10917e5465f7a217f0bf5b44909b160a299 to tm-release Change-Id: I22fea03f3aea37977f64adc8267a743d0ab8b307
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), } }