commit | 643b512e66b5c4378fdac64e3dd50bfaa58b3329 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Fri Apr 15 20:04:44 2022 -0700 |
committer | Linux Build Service Account <lnxbuild@localhost> | Fri Apr 15 20:04:44 2022 -0700 |
tree | 04e1f5beb84a6589374bc4dc670374327c99f50a | |
parent | 88249e84893b433f4ef7c7a305aac7cf35b59121 [diff] | |
parent | f8df814a1657aa70fb336df81617976c6cba77bd [diff] |
Merge f8df814a1657aa70fb336df81617976c6cba77bd on remote branch Change-Id: I722c74662ad4a8630cb20a00a961ca723a869c6a
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), } }