commit | 968e190181ce36aba6d430d85345f4addb50c90d | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Wed Feb 17 03:16:50 2021 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Wed Feb 17 03:16:50 2021 +0000 |
tree | 28ded3e268f7970c9b9a5b9e1dfed07c37063f29 | |
parent | f2495b4806cacb19c0c1c51b34a0ee99b6742ee2 [diff] | |
parent | cc1e1658467b873f13271a7000b595336be4d536 [diff] |
Snap for 7149879 from cc1e1658467b873f13271a7000b595336be4d536 to sc-release Change-Id: Ifb9dd5bc35448b8693a7bdc369cd4648804a4498
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), } }