| commit | 748d7ef3125dabdf5cb66ccf48dc4305fb223c1a | [log] [tgz] |
|---|---|---|
| author | Android Build Coastguard Worker <[email protected]> | Fri Jul 07 05:23:41 2023 +0000 |
| committer | Android Build Coastguard Worker <[email protected]> | Fri Jul 07 05:23:41 2023 +0000 |
| tree | 1b1ba7f0a897cdeda990520838f863cbaf2a3276 | |
| parent | b968a21af1748e29ac522a438c4e5df7c07b16f2 [diff] | |
| parent | d0a666aa5b1cdb5d9d06a4592782bfd6eb887b29 [diff] |
Snap for 10453563 from d0a666aa5b1cdb5d9d06a4592782bfd6eb887b29 to mainline-rkpd-release Change-Id: I8382c2d1f3c39c386cd2bc29cfd84afb71dfb13e
Support for matching file paths against Unix shell style patterns.
To use glob, add this to your Cargo.toml:
[dependencies] glob = "0.3.1"
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), } }