Expand description
Globby is a library designed for searching all items in a given directory that match a glob pattern.
§Examples
use globby::{PatternOpts, glob};
let pattern = glob("**/*.*").unwrap();
for path in pattern {
println!("{}", path.unwrap().display());
}
This library should work on any platform.
§Comparing to glob
The well-known glob library is more polished and has a lot more options, but also opinionated defaults that differ from this library, such as:
- The base directory is not yielded in the results
- Symbolic links are always followed
- Directories are always yielded before their descendents
- Alternate groups (matching either one sub-pattern or another) is supported
**
matches anything, including files an hidden directories
§Syntax
See Pattern
.
Structs§
- Pattern
- A pattern that can be matched against filesystem paths
- Pattern
Opts - Options for pattern matching
- Walker
- Walker implementation, yielding filesystem entries that match the provided pattern
- Windows
Drive - A valid Windows drive
Enums§
- Glob
Error - Error occuring during glob execution
- Path
Prefix - Pattern
Match Result - Result of a pattern matching against a path
Functions§
- glob
- Match a pattern against the current directory
- glob_in
- Match a pattern against a provided directory
- glob_
in_ with - Match a pattern against a provided directory
- glob_
with - Match a pattern against the current directory
- normalize_
path - Normalize a path