Package: gtk

Function gtk-file-chooser-current-folder-uri

Lambda List

gtk-file-chooser-current-folder-uri (chooser)

Syntax

(gtk-file-chooser-current-folder-uri chooser) => uri
(setf (gtk-file-chooser-current-folder-uri chooser) uri)

Arguments

chooser -- a gtk-file-chooser widget
uri -- a string with the URI for the current folder

Details

Accessor of the URI for the current folder of the file chooser.

The gtk-file-chooser-current-folder-uri function gets the current folder of the file chooser as an URI. This function will also return nil if the file chooser was unable to load the last folder that was requested from it. For example, as would be for calling this function on a nonexistent folder.

Note that this is the folder that the file chooser is currently displaying, e.g. file:///home/username/Documents, which is not the same as the currently selected folder if the chooser is in :select-folder, e.g. file:///home/username/Documents/selected-folder/. To get the currently selected folder in that mode, use the gtk-file-chooser-uri function as the usual way to get the selection.

The (setf gtk-file-chooser-current-folder-uri) function sets the current folder for the file chooser from an URI. The user will be shown the full contents of the current folder, plus user interface elements for navigating to other folders.

In general, you should not use this function. See the section on setting up a file chooser dialog for the rationale behind this.
 

See also

*2021-2-5