Expand description
Common operations for xvc file
Modules§
Structs§
- File
Text OrBinary - 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
orxvc file recheck
, where we already track the files in the store. - move_
to_ cache - Moves the
path
tocache_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 inxvc_metadata_store
. - pipe_
path_ digest - Receives path and metadata and sends content digests of the sent paths.
- recheck_
from_ cache - Copies / links
cache_path
toxvc_path
withrecheck_method
. WARNING: Ifxvc_path
is already present, it will be deleted first. It also sends an ignore operation toignore_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 towardsxvc 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.