select_folder


Description:

public async File? select_folder (Window? parent, Cancellable? cancellable) throws Error

This function initiates a directory selection operation by presenting a file chooser dialog to the user.

If you pass initial_folder, the file chooser will initially be opened in the parent directory of that folder, otherwise, it will be in the directory [property@Gtk.FileDialog:initial-folder].

The callback will be called when the dialog is dismissed. It should call [method@Gtk.FileDialog.select_folder_finish] to obtain the result.

Parameters:

this

a `GtkFileDialog`

parent

the parent `GtkWindow`

cancellable

a `GCancellable` to cancel the operation

callback

a callback to call when the operation is complete

user_data

data to pass to callback