Skip to main content

clean

Function clean 

Source
pub fn clean(location: &Path, base: Option<&Path>) -> Result<CleanReport>
Expand description

Removes the store of base from location, or with base None every store in it, then the location itself when nothing but skif’s own tag files is left. Only the files a store wrote are removed, from directories named like a base key that hold a store’s lock or base file, so a location shared with another tool (the downloads of the pre-commit launcher, which also reads SKIF_CACHE_DIR) keeps every file skif did not write. A missing location is clean. A store that cannot be removed does not keep the others: they are removed first.

§Errors

The location exists but cannot be listed, or a store to remove could not be.