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