GLib.utime
Description: Reference for GLib.utime

### Function

# GLibutime

since: 2.18

#### Declaration

    int
    g_utime (
      const gchar* filename,
      utimbuf* utb
    )

#### Description

A wrapper for the POSIX `utime()` function. The `utime()` function sets the access and modification timestamps of a file.

See your C library manual for more details about how `utime()` works on your system.

Available since: 2.18

#### Parameters

`filename`

  Type: `const gchar*`

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

  The data is owned by the caller of the function.
  The value is a file system path, using the OS encoding.

`utb`

  Type: `utimbuf*`

  A pointer to a struct utimbuf.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: `int`

0 if the operation was successful, -1 if an error occurred.