Expand description
Utilities for globbing the file system.
Re-exports§
pub use wax;
Structs§
- Glob
- Pattern that can be matched against paths and directory trees.
- Glob
Cache - A singleton for glob caches.
- GlobSet
- Match values against a set of glob patterns.
- Glob
Walk Options - Options to customize walking behavior.
Enums§
- Glob
Error - Glob errors.
Functions§
- add_
global_ negations - Add global negated patterns to all glob sets and walking operations.
- create_
glob - Parse and create a
Globinstance from the borrowed string pattern. If parsing fails, aGlobErroris returned. - is_glob
- Return true if the provided string looks like a glob pattern. This is not exhaustive and may be inaccurate.
- normalize
- Normalize a glob-based file path to use forward slashes. If the path contains
invalid UTF-8 characters, a
GlobErroris returned. - partition_
patterns - Partition a list of patterns and a base directory into buckets, keyed by the common parent directory. This helps to alleviate over-globbing on large directories.
- set_
global_ negations - Set global negated patterns to be used by all glob sets and walking operations. This will overwrite any existing global negated patterns.
- split_
patterns - Split a list of glob patterns into separate non-negated and negated patterns.
Negated patterns must start with
!. - walk
- Walk the file system starting from the provided directory, and return all files and directories
that match the provided glob patterns. Use
walk_filesif you only want to return files. - walk_
fast - Walk the file system starting from the provided directory, and return all files and directories that match the provided glob patterns.
- walk_
fast_ with_ options - Walk the file system starting from the provided directory, and return all files and directories that match the provided glob patterns, and customize further with the provided options.
- walk_
files - Walk the file system starting from the provided directory, and return all files
that match the provided glob patterns. Use
walkif you need directories as well.