Function std::os::rename_file

pub fn rename_file(old: &Path, new: &Path) -> bool

Renames an existing file or directory