FileChooser.getCurrentFolderUri

string getCurrentFolderUri()

Gets the current folder of chooser as an URI. See [gtk.file_chooser.FileChooser.setCurrentFolderUri].

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 [gtk.types.FileChooserAction.SelectFolder] mode (e.g. "file:///home/username/Documents/selected-folder/". To get the currently-selected folder in that mode, use [gtk.file_chooser.FileChooser.getUri] as the usual way to get the selection.

Returns

the URI for the current folder.

Free with [glib.global.gfree]. 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.FileChooser.setCurrentFolderUri] on a nonexistent folder.