fn replace_atomically( staging: &Path, destination: &Path, backup: &Path, ) -> Result<(), String>
Moves staging to destination, keeping the old folder in backup and restoring it if the move fails.
staging
destination
backup