Function move_to_cache

Source
pub fn move_to_cache(
    path: &AbsolutePath,
    cache_path: &AbsolutePath,
    path_sync: &PathSync,
) -> Result<()>
Expand description

Moves the path to cache_path.

It creates the cache directory and sets the cache file read only.

It overwrites the cache file if it already exists.

The PathSync struct is used to lock the paths during the operation, so that no two threads try to accessl to the same path at the same time.