Function renameat
fn renameat<P1: ?Sized + NixPath, P2: ?Sized + NixPath, Fd1: std::os::fd::AsFd, Fd2: std::os::fd::AsFd>(old_dirfd: Fd1, old_path: &P1, new_dirfd: Fd2, new_path: &P2) -> Result<()>
Change the name of a file.
The renameat function is equivalent to rename except in the case where either old_path
or new_path specifies a relative path. In such cases, the file to be renamed (or the its new
name, respectively) is located relative to old_dirfd or new_dirfd, respectively