commit | fe13f06bda6cf897f700e594526dc99a0d561005 | [log] [tgz] |
---|---|---|
author | Matthew Maurer <mmaurer@google.com> | Mon Jul 06 13:20:45 2020 -0700 |
committer | Matthew Maurer <mmaurer@google.com> | Mon Jul 06 13:20:45 2020 -0700 |
tree | 23ae6e8d9a5459c38368ec26573c03f9931476e6 | |
parent | 7bda6bcee6ff1439ad028c56a7b393974177d7de [diff] |
Support building all variants. Bug: 143217452 Test: cd external/rust; mma; atest in all TEST_MAPPING subdirs Change-Id: I0a97f8cc4531aef7523d3e59f68630adc48fdda3
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), } }