Method

GioFileget_uri_scheme

Declaration [src]

char*
g_file_get_uri_scheme (
  GFile* file
)

Description [src]

Gets the URI scheme for a GFile. RFC 3986 decodes the scheme as:

URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

Common schemes include “file”, “http”, “ftp”, etc.

The scheme can be different from the one used to construct the GFile, in that it might be replaced with one that is logically equivalent to the GFile.

This call does no blocking I/O.

Return value

Type: char*

A string containing the URI scheme for the given GFile or NULL if the GFile was constructed with an invalid URI. 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 return value can be NULL.
The value is a NUL terminated UTF-8 string.