Method lrs::file::File::rel_rename

Renames a file relative to this file.

Syntax

impl File {
    fn rel_rename<P, Q>(&self, from: P, to: Q, replace: bool) -> Result<(), Errno>
        where Q: ToCString,
              P: ToCString,
}

Arguments

NameDescription
from

The path of the file to be renamed.

to

The new name of the file.

replace

Whether to is replaced if it already exists.

Remarks

If the paths are relative, this file must be a directory and the paths will be interpreted relative to it. Both paths must refer to the same mount point or the operation fails.

Kernel versions

If replace is false, the required kernel version is 3.15.

See also