### Function

# GLib utime

since: 2.18

#### Declaration [src]

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

#### Description [src]

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 platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.

`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.