Renames a file.
fn rename<P, Q>(from: P, to: Q, replace: bool) -> Result<(), Errno>
where Q: ToCString,
P: ToCString,| Name | Description |
|---|---|
| from | The path of the file to be renamed. |
| to | The new name of the file. |
| replace | Whether |
If the paths are relative, they will be interpreted relative to the current working directory. Both paths must refer to the same mount point or the operation fails.
If replace is false, the required kernel version is 3.15.