GlobWalk
Recursively find files in a directory using globs.
This crate is now in a perpetual maintnance mode and new users should probably cosider using glob.
Comparison to the glob crate
This crate was origially written years ago, when glob was a very differet crate,
before it was adopted by the rust-lang org.
Nowadays glob is much better, and overall better maintained,
but there are a few features that it does not seem to have (based on glob 0.3.1):
- The
globcrate does not support having{a,b}in patterns. globwalkcan match several glob-patterns at the same time.globwalksupports excluding results with!. (negative patterns)globsearches for files in the current working directory, whereasglobwalkstarts at a specified base-dir.
Usage
To use this crate, add globwalk as a dependency to your project's Cargo.toml:
[]
= "0.9.1"
The following piece of code recursively find all png, jpg, or gif files:
extern crate globwalk;
use fs;
for img in glob.unwrap
See the documentation for more details.