commit | f2495b4806cacb19c0c1c51b34a0ee99b6742ee2 | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Wed Nov 25 02:28:34 2020 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Wed Nov 25 02:28:34 2020 +0000 |
tree | f82ddf1f6eb37018bd1ac1010b4842833c5ad644 | |
parent | e790ceec075008bc9f78c18508b5334c1b27e302 [diff] | |
parent | 673c3055d670e15645af6e7bdc79e95d53f2979e [diff] |
Snap for 6993684 from 673c3055d670e15645af6e7bdc79e95d53f2979e to sc-release Change-Id: Ic818b83a9f541767d7d500c212e525a45dfcfe0b
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), } }