[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 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. |