Skip to main content

sweep_stale_temps

Function sweep_stale_temps 

Source
pub fn sweep_stale_temps(dir: &Path, min_age: Duration) -> usize
Expand description

Remove the temp files in dir that an interrupted write left behind: only files named like write_atomic’s, and only those last changed more than min_age ago. Returns how many were removed. A folder that can’t be read or a file that can’t be removed is logged and left, never an error: this runs at start and must not stop it.