Function nix::fcntl::renameat

source ·
pub fn renameat<P1: ?Sized + NixPath, P2: ?Sized + NixPath, Fd1: AsFd, Fd2: AsFd>(
    old_dirfd: Fd1,
    old_path: &P1,
    new_dirfd: Fd2,
    new_path: &P2,
) -> Result<()>
Expand description

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

§See Also

renameat