### Virtual Method

# Gio File get_uri

#### Declaration

    char*
    get_uri (
      GFile* file
    )

#### Description

Gets the URI for the `file`.

This call does no blocking I/O.

#### Return value

Type: `char*`

A string containing the `GFile`‘s URI. If the `GFile` was constructed with an invalid URI, an invalid URI is returned. The returned string should be freed with `g_free()` when no longer needed.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.