xvc_file

Module common

Source
Expand description

Common operations for xvc file

Modules§

Structs§

Functions§

  • Builds a glob matcher based on the provided directory and glob patterns.
  • All cache paths for all xvc paths. There are extracted from the event logs.
  • Filter a set of paths by a set of globs. The globs are compiled into a GlobSet and paths are checked against the set.
  • Filters the paths in the store by given globs.
  • 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.
  • Moves the path to cache_path.
  • Move an xvc_path to the cache path. Uses move_to_cache
  • Selects only the files in targets by matching them with the metadata in xvc_metadata_store.
  • Receives path and metadata and sends content digests of the sent paths.
  • 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 a path to readonly on unix systems.
  • Set a path to user writable on unix systems.
  • 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.
  • 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.
  • 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.