commit | dfea91e83a213144efeb0604ab1bbde7e9989f98 | [log] [tgz] |
---|---|---|
author | android-build-prod (mdb) <android-build-team-robot@google.com> | Wed Jul 08 00:11:57 2020 +0000 |
committer | android-build-prod (mdb) <android-build-team-robot@google.com> | Wed Jul 08 00:11:57 2020 +0000 |
tree | 23ae6e8d9a5459c38368ec26573c03f9931476e6 | |
parent | d187512e446c10689371e93cf6a926832e32ac48 [diff] | |
parent | fe13f06bda6cf897f700e594526dc99a0d561005 [diff] |
Snap for 6660490 from fe13f06bda6cf897f700e594526dc99a0d561005 to sdk-release Change-Id: Ib2dfdf3765a2781ced948f674c43dc14a5d62cc7
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), } }