Dialog for selecting files or directories in the filesystem.
</brief_description>
<description>
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].
</description>
<tutorials>
</tutorials>
<methods>
<methodname="add_filter">
<returntype="void"/>
<argumentindex="0"name="filter"type="String"/>
<description>
Adds [code]filter[/code] to the list of filters, which restricts what files can be picked.
A [code]filter[/code] should be of the form [code]"filename.extension ; Description"[/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.
Example filters: [code]"*.png ; PNG Images"[/code], [code]"project.godot ; Godot Project"[/code].
</description>
</method>
<methodname="clear_filters">
<returntype="void"/>
<description>
Clear all the added filters in the dialog.
</description>
</method>
<methodname="deselect_items">
<returntype="void"/>
<description>
Clear currently selected items in the dialog.
</description>
</method>
<methodname="get_line_edit">
<returntype="LineEdit"/>
<description>
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.
</description>
</method>
<methodname="get_vbox">
<returntype="VBoxContainer"/>
<description>
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.
</description>
</method>
<methodname="invalidate">
<returntype="void"/>
<description>
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 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]. 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 [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").