Valadoc | Vala | Tutorial | API-References | Markup

rename


Description:

public int rename (string oldfilename, string newfilename)

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.

Returns:

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

Namespace: GLib.FileUtils
Package: glib-2.0