A dialog for selecting files or directories in the filesystem.
[FileDialog] is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. [FileDialog] automatically sets its window title according to the [member file_mode]. If you want to use a custom title, disable this by setting [member mode_overrides_title] to [code]false[/code].
Adds a comma-delimited file name [param filter] option to the [FileDialog] with an optional [param description], which restricts what files can be picked.
A [param filter] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed.
For example, a [param filter] of [code]"*.png, *.jpg"[/code] and a [param description] of [code]"Images"[/code] results in filter text "Images (*.png, *.jpg)".
Clear all the added filters in the dialog.
Clear all currently selected items in the dialog.
Returns the LineEdit for the selected file.
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
Returns the vertical box container of the dialog, custom controls can be added to it.
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
Invalidate and update the current dialog content list.
The file system access scope. See [enum Access] constants.
[b]Warning:[/b] Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url].
The current working directory of the file dialog.
The currently selected file of the file dialog.
The currently selected file path of the file dialog.
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode].
The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. Multiple file types can also be specified in a single filter. [code]"*.png, *.jpg, *.jpeg ; Supported Images"[/code] will show both PNG and JPEG files when selected.
If [code]true[/code], changing the [member file_mode] property will set the window title accordingly (e.g. setting [member file_mode] to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File").
If non-empty, the given sub-folder will be "root" of this [FileDialog], i.e. user won't be able to go to its parent directory.
If [code]true[/code], the dialog will show hidden files.
Emitted when the user selects a directory.
Emitted when the user selects a file by double-clicking it or pressing the [b]OK[/b] button.
Emitted when the user selects multiple files.
The dialog allows selecting one, and only one file.
The dialog allows selecting multiple files.
The dialog only allows selecting a directory, disallowing the selection of any file.
The dialog allows selecting one file or directory.
The dialog will warn when a file exists.
The dialog only allows accessing files under the [Resource] path ([code]res://[/code]).
The dialog only allows accessing files under user data path ([code]user://[/code]).
The dialog allows accessing files on the whole file system.
The color tint for disabled files (when the [FileDialog] is used in open folder mode).
The color modulation applied to the file icon.
The color modulation applied to the folder icon.
Custom icon for the back arrow.
Custom icon for files.
Custom icon for folders.
Custom icon for the forward arrow.
Custom icon for the parent folder arrow.
Custom icon for the reload button.
Custom icon for the toggle hidden button.