FileUtils.rename

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. Since 2.6

class FileUtils
static
int
rename
(,)

Parameters

oldfilename string

a pathname in the GLib file name encoding (UTF-8 on Windows)

newfilename string

a pathname in the GLib file name encoding

Return Value

Type: int

0 if the renaming succeeded, -1 if an error occurred

Meta