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