Function

GLib-2.0GLibrenameSince 2.6

  • 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: string

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

    • newfilename: string

      a pathname in the GLib file name encoding

    Returns number

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

    2.6