Gtk.FileDialog
Description: Reference for Gtk.FileDialog

### Class

# GtkFileDialog

since: 4.10

#### Description [src]

    final class Gtk.FileDialog : GObject.Object
    {
      /* No available fields */
    }

Asynchronous API to present a file chooser dialog.

`GtkFileDialog` collects the arguments that are needed to present the dialog to the user, such as a title for the dialog and whether it should be modal.

The dialog is shown with `gtk_file_dialog_open()`, `gtk_file_dialog_save()`, etc.

Available since: 4.10

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### gtk_file_dialog_new

Creates a new `GtkFileDialog` object.

since: 4.10

#### Instance methods

###### gtk_file_dialog_get_accept_label

Retrieves the text used by the dialog on its accept button.

since: 4.10

###### gtk_file_dialog_get_default_filter

Gets the filter that will be selected by default in the file chooser dialog.

since: 4.10

###### gtk_file_dialog_get_filters

Gets the filters that will be offered to the user in the file chooser dialog.

since: 4.10

###### gtk_file_dialog_get_initial_file

Gets the file that will be initially selected in the file chooser dialog.

since: 4.10

###### gtk_file_dialog_get_initial_folder

Gets the folder that will be set as the initial folder in the file chooser dialog.

since: 4.10

###### gtk_file_dialog_get_initial_name

Gets the filename that will be initially selected.

since: 4.10

###### gtk_file_dialog_get_modal

Returns whether the file chooser dialog blocks interaction with the parent window while it is presented.

since: 4.10

###### gtk_file_dialog_get_title

Returns the title that will be shown on the file chooser dialog.

since: 4.10

###### gtk_file_dialog_open

Presents a file chooser dialog to the user.

since: 4.10

###### gtk_file_dialog_open_finish

Finishes the `gtk_file_dialog_open()` call.

since: 4.10

###### gtk_file_dialog_open_multiple

Presents a file chooser dialog to the user.

since: 4.10

###### gtk_file_dialog_open_multiple_finish

Finishes the `gtk_file_dialog_open()` call.

since: 4.10

###### gtk_file_dialog_open_multiple_text_files

Presents a file chooser dialog to the user.

since: 4.18

###### gtk_file_dialog_open_multiple_text_files_finish

Finishes the `gtk_file_dialog_open()` call.

since: 4.18

###### gtk_file_dialog_open_text_file

Initiates a file selection operation by presenting a file chooser dialog to the user.

since: 4.18

###### gtk_file_dialog_open_text_file_finish

Finishes the `gtk_file_dialog_open_text_file()` call and returns the resulting file and text encoding.

since: 4.18

###### gtk_file_dialog_save

Presents a file chooser dialog to the user.

since: 4.10

###### gtk_file_dialog_save_finish

Finishes the `gtk_file_dialog_save()` call.

since: 4.10

###### gtk_file_dialog_save_text_file

Initiates a file save operation by presenting a file chooser dialog to the user.

since: 4.18

###### gtk_file_dialog_save_text_file_finish

Finishes the `gtk_file_dialog_save_text_file()` call and returns the resulting file, text encoding and line endings.

since: 4.18

###### gtk_file_dialog_select_folder

Presents a file chooser dialog to the user.

since: 4.10

###### gtk_file_dialog_select_folder_finish

Finishes the `gtk_file_dialog_select_folder()` call.

since: 4.10

###### gtk_file_dialog_select_multiple_folders

Presents a file chooser dialog to the user.

since: 4.10

###### gtk_file_dialog_select_multiple_folders_finish

Finishes the `gtk_file_dialog_select_multiple_folders()` call.

since: 4.10

###### gtk_file_dialog_set_accept_label

Sets the label shown on the file chooser’s accept button.

since: 4.10

###### gtk_file_dialog_set_default_filter

Sets the filter that will be selected by default in the file chooser dialog.

since: 4.10

###### gtk_file_dialog_set_filters

Sets the filters that will be offered to the user in the file chooser dialog.

since: 4.10

###### gtk_file_dialog_set_initial_file

Sets the file that will be initially selected in the file chooser dialog.

since: 4.10

###### gtk_file_dialog_set_initial_folder

Sets the folder that will be set as the initial folder in the file chooser dialog.

since: 4.10

###### gtk_file_dialog_set_initial_name

Sets the filename that will be initially selected.

since: 4.10

###### gtk_file_dialog_set_modal

Sets whether the file chooser dialog blocks interaction with the parent window while it is presented.

since: 4.10

###### gtk_file_dialog_set_title

Sets the title that will be shown on the file chooser dialog.

since: 4.10

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Gtk.FileDialog:accept-label

Label for the file chooser’s accept button.

since: 4.10

###### Gtk.FileDialog:default-filter

The default filter.

since: 4.10

###### Gtk.FileDialog:filters

The list of filters.

since: 4.10

###### Gtk.FileDialog:initial-file

The initial file.

since: 4.10

###### Gtk.FileDialog:initial-folder

The initial folder.

since: 4.10

###### Gtk.FileDialog:initial-name

The initial name.

since: 4.10

###### Gtk.FileDialog:modal

Whether the file chooser dialog is modal.

since: 4.10

###### Gtk.FileDialog:title

A title that may be shown on the file chooser dialog.

since: 4.10

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GtkFileDialogClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.