Module glob

Module glob 

Source
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.
GlobCache
A singleton for glob caches.
GlobSet
Match values against a set of glob patterns.
GlobWalkOptions
Options to customize walking behavior.

Enums§

GlobError
Glob errors.

Functions§

add_global_negations
Add global negated patterns to all glob sets and walking operations.
create_glob
Parse and create a Glob instance from the borrowed string pattern. If parsing fails, a GlobError is 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 GlobError is 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_files if 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 walk if you need directories as well.