GLib.get_user_runtime_dir
Description: Reference for GLib.get_user_runtime_dir

### Function

# GLibget_user_runtime_dir

since: 2.28

#### Declaration [src]

    const gchar*
    g_get_user_runtime_dir (
      void
    )

#### Description [src]

Returns a directory that is unique to the current user on the local system.

This is determined using the mechanisms described in the XDG Base Directory Specification. This is the directory specified in the `XDG_RUNTIME_DIR` environment variable. In the case that this variable is not set, we return the value of g_get_user_cache_dir(), after verifying that it exists.

The return value is cached and modifying it at runtime is not supported, as it’s not thread-safe to modify environment variables at runtime.

Available since: 2.28

#### Return value

Type: `const gchar*`

A string owned by GLib that must not be modified or freed.

The data is owned by the called function.
The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.