Function

GLibfilename_from_uri

Declaration [src]

gchar*
g_filename_from_uri (
  const gchar* uri,
  gchar** hostname,
  GError** error
)

Description [src]

Converts an escaped ASCII-encoded URI to a local filename in the encoding used for filenames.

Parameters

uri const gchar*
 

A uri describing a filename (escaped, encoded in ASCII).

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
hostname gchar**
 

Location to store hostname for the URI. If there is no hostname in the URI, NULL will be stored in this location.

 The argument will be set by the function.
 The argument can be set to NULL.
 The argument can be NULL.
 The called function takes ownership of the data, and is responsible for freeing it.
 The string is a NUL terminated UTF-8 string.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gchar*
 

A newly-allocated string holding the resulting filename, or NULL on an error.

 The caller of the function takes ownership of the data, and is responsible for freeing it.
 The string is a file system path, using the OS encoding.