### Method

# GLib PathBuf clear_to_path

since: 2.76

#### Declaration [src]

    char*
    g_path_buf_clear_to_path (
      GPathBuf* buf
    )

#### Description [src]

Clears the contents of the path buffer and returns the built path.

This function returns `NULL` if the `GPathBuf` is empty.

See also: g_path_buf_to_path().

Available since: 2.76

#### Return value

Type: `char*`

The built path.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.
The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.