Function atomicwrites::replace_atomic

source ยท
pub fn replace_atomic(src: &Path, dst: &Path) -> Result<()>
Expand description

Move src to dst. If dst exists, it will be silently overwritten.

Both paths must reside on the same filesystem for the operation to be atomic.