[Overview][Constants][Types][Procedures and functions][Index] |
Rename file
Source position: bunxh.inc line 79
function FpRename( |
old: pChar; |
newpath: pChar |
):cint; |
const old: RawByteString; |
const newpath: RawByteString |
):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 success, a nonzero value indicates failure.
Note: There exist a portable alternative 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. |