commit | ea6798554cae44b3b3c3acacd691722c8135edbc | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Mon Aug 30 21:30:09 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Aug 30 21:30:09 2021 +0000 |
tree | cb03950958aa0e6190e987f65a4a8fb065f619ff | |
parent | c59747010f937f4023381d24bdcae7068b478d68 [diff] | |
parent | 14acddaaede386508e65f1b58e556af5f5730146 [diff] |
Update TEST_MAPPING am: b38ec1287e am: b6dce7ec20 am: 14acddaaed Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/glob/+/1813878 Change-Id: I2f00bbbbc94bfff178bc725fcbd4a2220399268f
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), } }