Support for matching file paths against Unix shell style patterns.
- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
CI / Tests-8 (push) Has been cancelled
CI / Tests-9 (push) Has been cancelled
CI / Tests-10 (push) Has been cancelled
CI / Tests-11 (push) Has been cancelled
CI / Tests-12 (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Check building with the MSRV (push) Has been cancelled
CI / Rustfmt (push) Has been cancelled
Release-plz / Release-plz (push) Has been cancelled
CI / Tests (push) Has been cancelled
CI / Tests-1 (push) Has been cancelled
CI / Tests-2 (push) Has been cancelled
CI / Tests-3 (push) Has been cancelled
CI / Tests-4 (push) Has been cancelled
CI / Tests-5 (push) Has been cancelled
CI / Tests-6 (push) Has been cancelled
CI / Tests-7 (push) Has been cancelled
CI / success (push) Has been cancelled
|
||
| .github | ||
| src | ||
| tests | ||
| .gitignore | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| README.md | ||
| triagebot.toml | ||
glob
Support for matching file paths against Unix shell style patterns.
Usage
To use glob, add this to your Cargo.toml:
[dependencies]
glob = "0.3.2"
If you're using Rust 1.30 or earlier, or edition 2015, add this to your crate root:
extern crate glob;
Examples
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),
}
}