Crate xvc_walker

Source
Expand description

Xvc walker traverses directory trees with ignore rules.

Ignore rules are similar to .gitignore and child directories are not traversed if ignored.

[walk_parallel] function is the most useful element in this module. It walks and sends PathMetadata through a channel, also updating the ignore rules and sending them.

Re-exports§

pub use pattern::MatchResult;
pub use pattern::PathKind;
pub use pattern::Pattern;
pub use pattern::PatternEffect;
pub use pattern::PatternRelativity;
pub use pattern::Source;
pub use walk_parallel::walk_parallel;
pub use walk_serial::walk_serial;
pub use walk_serial::path_metadata_map_from_file_targets;
pub use abspath::AbsolutePath;
pub use error::Error;
pub use error::Result;
pub use ignore_rules::IgnoreRules;
pub use ignore_rules::SharedIgnoreRules;
pub use sync::PathSync;
pub use sync::PathSyncSingleton;
pub use notify::make_polling_watcher;
pub use notify::make_watcher;
pub use notify::PathEvent;

Modules§

abspath
An absolute path type to ensure that we don’t use relative paths.
error
Error codes and messages for Xvc Walker
ignore_rules
Ignore patterns for a directory and its child directories.
notify
A libnotify based file system notification module that considers ignore rules.
pattern
Pattern describes a single line in an ignore file and its semantics It is used to match a path with the given pattern
sync
This module contains PathSync structure to synchronize operations on paths.
walk_parallel
Parallel walk implementation
walk_serial
Serial directory walker without parallelization See [walk_parallel] for parallel version.

Structs§

Glob
Glob represents a glob pattern matcher with support for multi-pattern matching.
PathMetadata
Combine a path and its metadata in a single struct
WalkOptions
What’s the ignore file name and should we add directories to the result?

Traits§

Hash
A hashable type.

Functions§

build_ignore_patterns
Build the ignore rules with the given directory
content_to_patterns
convert a set of rules in content to glob patterns. patterns may come from source. the root directory of all search is in ignore_root.
directory_list
Return all childs of a directory regardless of any ignore rules If there is an error to obtain the metadata, error is added to the element instead
update_ignore_rules
Updates the ignore rules from a given directory.

Type Aliases§

RecommendedWatcher
The recommended Watcher implementation for the current platform

Derive Macros§

Hash
Derive macro generating an impl of the trait Hash.