commit | 0833bf255b648f77dfcf3546de79956653ca1bc4 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Jun 22 17:08:30 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Jun 22 17:08:30 2023 +0000 |
tree | 1b1ba7f0a897cdeda990520838f863cbaf2a3276 | |
parent | efe1a886b80729ce6dd855ed2b340a6c781d51ee [diff] | |
parent | 47b1279e334853672b04c3c6e494fb6fb8e962c4 [diff] |
Snap for 10363732 from 47b1279e334853672b04c3c6e494fb6fb8e962c4 to emu-33-release Change-Id: I4da6dd3884b48843385f1e539ff72bf4ca36b3a0
Support for matching file paths against Unix shell style patterns.
To use glob
, add this to your Cargo.toml
:
[dependencies] glob = "0.3.1"
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), } }