rename
fn
int rename(string oldfilename, string newfilename)A wrapper for the POSIX rename() function. The rename() function renames a file, moving it between directories if required.
See your C library manual for more details about how rename() works on your system. It is not possible in general on Windows to rename a file that is open to some process.
Parameters
oldfilename | a pathname in the GLib file name encoding (UTF-8 on Windows) |
newfilename | a pathname in the GLib file name encoding |
Returns
0 if the renaming succeeded, -1 if an error occurred