Module file

Source
Expand description

Core file operationscorefil

Statics§

COMPILED_GLOB
Cached static for the compiled_glob function.

Functions§

all_paths_and_metadata
A convenience function to return all paths in an Xvc repository. This is meant to be called once in the beginning and the result is carried around instead of hitting the disk every time we look for the changes. It returns the generated XvcPathMetadataMap and IgnoreRules that is created during traversal. NOTE: This function only returns a snapshot of the repository. If you want to handle events after this initial snapshot, see xvc_walker::notify::make_watcher.
compiled_glob
Returns a compiled glob::Pattern by prepending it with pipeline_rundir.
compiled_glob_no_cache
Origin of the cached function compiled_glob.
compiled_glob_prime_cache
Primes the cached function compiled_glob. Returns a compiled glob::Pattern by prepending it with pipeline_rundir.
dir_includes
Checks whether path is under directory by checking first if it’s in the pmm keys
glob_includes
Checks whether glob includes path. Note that, if the path is ignored, this fn always returns false
glob_paths
Returns all non-ignored paths described with glob under root_dir
is_text_file
Checks whether a file in path is a text file by loading the first 8000 bytes (or whole file) and checks if it contains 0 (NUL). The technique is used also by Git.
make_symlink
Creates a symlink from target to original
path_metadata_channel
w
pipe_filter_path_errors
Clears errors in receiver by ignoring them. TODO: sender can be of Sender<PathMetadata>