Function obnth::rename2[][src]

pub fn rename2<P, R>(
    old_dir: &Dir,
    old_path: P,
    new_dir: &Dir,
    new_path: R,
    flags: Rename2Flags,
    lookup_flags: LookupFlags
) -> Result<()> where
    P: AsPath,
    R: AsPath

Linux-specific: Rename a file across directories, specifying extra flags to modify behavior.

This calls the renameat2() syscall, which was added in Linux 3.15. It will fail with ENOSYS on older kernels, and it will fail with EINVAL if any of the given flags are not supported by the filesystem. See renameat2(2) for more details.

Otherwise, the semantics of this are identical to rename().