Method

GtkFileChooserget_uri

since: 2.4

Declaration [src]

gchar*
gtk_file_chooser_get_uri (
  GtkFileChooser* chooser
)

Description [src]

Gets the URI for the currently selected file in the file selector. If multiple files are selected, one of the filenames will be returned at random.

If the file chooser is in folder mode, this function returns the selected folder.

Available since: 2.4

Return value

Type: gchar*

The currently selected URI, or NULL if no file is selected. If gtk_file_chooser_set_local_only() is set to TRUE (the default) a local URI will be returned for any FUSE locations. Free with g_free().

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.