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_current_dir};
let pattern = glob_current_dir("**/*.*").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§
- NoIncoming
Dir - 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
Enums§
- Glob
Error - Error occuring during glob execution
- Pattern
Match Result - Result of a pattern matching against a path
Functions§
- glob
- Match a pattern against a directory
- glob_
current_ dir - Match a pattern against the current directory
- glob_
current_ dir_ with - Match a pattern against the current directory
- glob_
with - Match a pattern against a directory