Method

GtkFileChooserget_filename

since: 2.4

Declaration [src]

gchar*
gtk_file_chooser_get_filename (
  GtkFileChooser* chooser
)

Description [src]

Gets the filename for the currently selected file in the file selector. The filename is returned as an absolute path. 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 filename, or NULL if no file is selected, or the selected file can’t be represented with a local filename. 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 file system path, using the OS encoding.