[Overview][Constants][Types][Procedures and functions] | Reference for unit 'BaseUnix' (#rtl) |
Rename file
Source position: line 0
function FpRename( |
old: pChar; |
newpath: pChar |
):cint; |
old: AnsiString; |
newpath: AnsiString |
):cint; |
FpRename renames the file Old to NewPath. NewPath can be in a different directory than Old, but it cannot be on another partition (device). Any existing file on the new location will be replaced.
If the operation fails, then the Old file will be preserved.
The function returns zero on succes, a nonzero value indicates failure.
Note: There exist a portable alterative to fpRename: system.rename. Please use fpRename only if you are writing Unix specific code. System.rename will work on all operating systems.
Extended error information can be retrieved using fpGetErrno.
|
Unlink (i.e. remove) a file. |
No notes exist for this page yet.