pub fn remove_capture(dir: &Path) -> Result<()>
Removes a copy made by capture, read-only as it is: first renamed to a temporary name, so a removal cut short never leaves a partial copy under its hash’s name (which a later capture of that hash would use as it is).
capture
The I/O error of making it writable again or of removing it.