commit | b025d70e5eee7487eb1b37572b5d435f81d5e695 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Nov 01 21:31:22 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Nov 01 21:31:22 2022 +0000 |
tree | 04e1f5beb84a6589374bc4dc670374327c99f50a | |
parent | 176e726d89f7fac71245aa53731027e421ee7fb7 [diff] | |
parent | d67ba1df3936b5f5e5fdb2566acdcbb30773640d [diff] |
Snap for 9239618 from d67ba1df3936b5f5e5fdb2566acdcbb30773640d to tm-platform-release Change-Id: I61dd00220caab085080fe2b6158d02cfaa4e6b38
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), } }