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. The FileDialog automatically sets its window title according to the [member mode]. If you want to use a custom title, disable this by setting [member mode_overrides_title] to [code]false[/code].
Adds [code]filter[/code] as a custom filter; [code]filter[/code] should be of the form [code]"filename.extension ; Description"[/code]. For example, [code]"*.png ; PNG Images"[/code].
Clear all the added filters in the dialog.
Clear currently selected items in the dialog.
Returns the LineEdit for the selected file.
Returns the vertical box container of the dialog, custom controls can be added to it.
Invalidate and update the current dialog content list.
- The file system access scope. See enum [code]Access[/code] constants. [b]Warning:[/b] Currently, in sandboxed environments such as HTML5 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 available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code].
- The dialog's open or save mode, which affects the selection behavior. See enum [code]Mode[/code] constants.
- If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant MODE_OPEN_FILE] will change the window title to "Open a File").
- 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.
Custom icon for files.
The color modulation applied to the file icon.
The color tint for disabled files (when the [FileDialog] is used in open folder mode).
Custom icon for folders.
The color modulation applied to the folder icon.
Custom icon for the parent folder arrow.
Custom icon for the reload button.
Custom icon for the toggle hidden button.