Module common

Source
Expand description

Common operations for xvc file

Modules§

compare
File comparison utilities.
gitignore
File and directory ignore handler

Structs§

FileTextOrBinary
Represents whether a file is a text file or not. We wrap TextOrBinary to specify persist! and conf!.

Functions§

build_glob_matcher
Builds a glob matcher based on the provided directory and glob patterns.
cache_paths_for_xvc_paths
All cache paths for all xvc paths. There are extracted from the event logs.
filter_paths_by_globs
Filter a set of paths by a set of globs. The globs are compiled into a GlobSet and paths are checked against the set.
filter_targets_from_store
Filters the paths in the store by given globs.
load_targets_from_store
This is to convert targets given in the CLI to XvcPaths. It doesn’t walk the file system. It’s to be used in xvc file carry-in or xvc file recheck, where we already track the files in the store.
move_to_cache
Moves the path to cache_path.
move_xvc_path_to_cache
Move an xvc_path to the cache path. Uses move_to_cache
only_file_targets
Selects only the files in targets by matching them with the metadata in xvc_metadata_store.
pipe_path_digest
Receives path and metadata and sends content digests of the sent paths.
recheck_from_cache
Copies / links cache_path to xvc_path with recheck_method. WARNING: If xvc_path is already present, it will be deleted first. It also sends an ignore operation to ignore_writer.
set_readonly
Set a path to readonly on unix systems.
set_writable
Set a path to user writable on unix systems.
targets_from_disk
Converts targets to a map of XvcPaths and their metadata. It walks the file system with all_paths_and_metadata. This is aimed towards xvc file track, xvc file hash and similar commands where we work with the existing files.
update_store_records
Record store records checking their Diff. It loads the store and creates a new store by apply_diff, then saves it. TODO: This may be optimized for in place update when stores get larger.
xvc_path_metadata_map_from_disk
Return the metadata of targets. This is used in various functions to get the changed files in repository. When you want to get all files and their metadata, it may be better to use all_paths_and_metadata.