Gtk.FileDialog
Description: Reference for Gtk.FileDialog

### Class

# GtkFileDialog

since: 4.10

#### Description [src]

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

A `GtkFileDialog` object collects the arguments that are needed to present a file chooser 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

#### 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 name for the file that should be initially set.

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

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

since: 4.10

###### gtk_file_dialog_open_finish

Finishes the `gtk_file_dialog_open()` call and returns the resulting file.

since: 4.10

###### gtk_file_dialog_open_multiple

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

since: 4.10

###### gtk_file_dialog_open_multiple_finish

Finishes the `gtk_file_dialog_open()` call and returns the resulting files in a `GListModel`.

since: 4.10

###### gtk_file_dialog_save

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

since: 4.10

###### gtk_file_dialog_save_finish

Finishes the `gtk_file_dialog_save()` call and returns the resulting file.

since: 4.10

###### gtk_file_dialog_select_folder

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

since: 4.10

###### gtk_file_dialog_select_folder_finish

Finishes the `gtk_file_dialog_select_folder()` call and returns the resulting file.

since: 4.10

###### gtk_file_dialog_select_multiple_folders

This function initiates a multi-directory selection operation by presenting 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 and returns the resulting files in a `GListModel`.

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 name for the file that should be initially set. For saving dialogs, this will usually be pre-entered into the name field.

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, that is, the filter that is initially active in the file chooser dialog.

since: 4.10

###### Gtk.FileDialog:filters

The list of filters.

since: 4.10

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

The initial file, that is, the file that is initially selected in the file chooser dialog.

since: 4.10

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

The initial folder, that is, the directory that is initially opened in the file chooser dialog.

since: 4.10

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

The initial name, that is, the filename that is initially selected in the file chooser dialog.

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.