commit | edfc610f279f0d761e697d535e2dd1bd75d3879e | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 25 07:53:15 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 25 07:53:15 2022 +0000 |
tree | 467513817bd1d1c5ba5d039fc542409fb3942af3 | |
parent | ef03b6db721ee5532b970c093edd8028b3c3ba1d [diff] | |
parent | 4e1bf22e5891b150c05c110e216490ac05ab7573 [diff] |
Snap for 8992082 from 4e1bf22e5891b150c05c110e216490ac05ab7573 to gki13-boot-release Change-Id: I03238e94f474b408b95cbdfed5cab290316cee52
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), } }