RenameFileUTF8 function
Renames a file to the specified value.
Declaration
function RenameFileUTF8(const OldName: string; const NewName: string)
: BooleanArguments
OldName | Existing name for the file. |
NewName | New name for the file. |
Function result
True if the file is successfully renamed to the new value.Description
RenameFileUTF8 is a
Boolean function used to rename a
file to the value specified in NewName.
For the Windows environment, MoveFileW is called to rename the file using the values specified in OldName and NewName. For UNIX-like environments, RenameFile in SysUtils is called to rename the file to the specified new value. InvalidateFileStateCache is also called.
The return value is True if the file is renamed successfully.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
