| Crates.io | globetter |
| lib.rs | globetter |
| version | 0.2.0 |
| created_at | 2022-10-04 10:18:54.13571+00 |
| updated_at | 2022-12-02 13:49:56.25488+00 |
| description | Glob fork with bug fixes! Support for matching file paths against Unix shell style patterns. |
| homepage | https://github.com/mtkennerly/globetter |
| repository | https://github.com/mtkennerly/globetter |
| max_upload_size | |
| id | 679742 |
| size | 88,328 |
This is a minimal fork of the Glob crate. As of 2022-10-04, its last release was 2019-03-07, and there are some outstanding defects. This fork is intended as a drop-in replacement for bug fixes, detailed in the changelog and releases page.
Support for matching file paths against Unix shell style patterns.
To use globetter, add it to your project by running cargo add globetter.
Print all jpg files in /media/ and all of its subdirectories.
use globetter::glob;
for entry in glob("/media/**/*.jpg").expect("Failed to read glob pattern") {
match entry {
Ok(path) => println!("{:?}", path.display()),
Err(e) => println!("{:?}", e),
}
}