Method
GtkFileChooserget_current_folder
since: 2.4
Declaration [src]
gchar*
gtk_file_chooser_get_current_folder (
GtkFileChooser* chooser
)
Description [src]
Gets the current folder of chooser
as a local filename.
See gtk_file_chooser_set_current_folder().
Note that this is the folder that the file chooser is currently displaying
(e.g. “/home/username/Documents”), which is not the same
as the currently-selected folder if the chooser is in
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
mode
(e.g. “/home/username/Documents/selected-folder/”. To get the
currently-selected folder in that mode, use gtk_file_chooser_get_uri()
as the
usual way to get the selection.
Available since: 2.4
Return value
Type: gchar*
The full path of the current
folder, or NULL
if the current path cannot be represented as a local
filename. Free with g_free(). This function will also return
NULL
if the file chooser was unable to load the last folder that
was requested from it; for example, as would be for calling
gtk_file_chooser_set_current_folder()
on a nonexistent folder.
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 platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows. |