Skip to main content

replace_file

Function replace_file 

Source
pub fn replace_file(tmp: &Path, path: &Path) -> Result<()>
Expand description

Atomically move a fully written tmp over path: rename(2) on Unix, windows_replace (with its bounded retry of a held target) on Windows. tmp is left in place on failure; the caller removes it.