GLib.PathBuf.to_path

### Method

# GLib PathBufto_path

since: 2.76

#### Declaration [src]

    char*
    g_path_buf_to_path (
      GPathBuf* buf
    )

#### Description [src]

Retrieves the built path from the path buffer.

On Windows, the result contains backslashes as directory separators, even if forward slashes were used in input.

If the path buffer is empty, this function returns `NULL`.

Available since: 2.76

#### Return value

Type: `char*`

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