Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

EditorFileDialog

Inherits: ConfirmationDialog < AcceptDialog < Window < Viewport < Node < Object

A modified version of FileDialog used by the editor.

Description

EditorFileDialog is an enhanced version of FileDialog available only to editor plugins. Additional features include list of favorited/recent files and the ability to see files as thumbnails grid instead of list.

Properties

Access

access

0

String

current_dir

String

current_file

String

current_path

bool

dialog_hide_on_ok

false (overrides AcceptDialog)

bool

disable_overwrite_warning

false

DisplayMode

display_mode

0

FileMode

file_mode

4

PackedStringArray

filters

PackedStringArray()

bool

show_hidden_files

false

String

title

"Save a File" (overrides Window)

Methods

void

add_filter ( String filter, String description="" )

void

clear_filters ( )

LineEdit

get_line_edit ( )

VBoxContainer

get_vbox ( )

void

invalidate ( )


Signals

dir_selected ( String dir )

Emitted when a directory is selected.


file_selected ( String path )

Emitted when a file is selected.


files_selected ( PackedStringArray paths )

Emitted when multiple files are selected.


Enumerations

enum FileMode:

FileMode FILE_MODE_OPEN_FILE = 0

The EditorFileDialog can select only one file. Accepting the window will open the file.

FileMode FILE_MODE_OPEN_FILES = 1

The EditorFileDialog can select multiple files. Accepting the window will open all files.

FileMode FILE_MODE_OPEN_DIR = 2

The EditorFileDialog can select only one directory. Accepting the window will open the directory.

FileMode FILE_MODE_OPEN_ANY = 3

The EditorFileDialog can select a file or directory. Accepting the window will open it.

FileMode FILE_MODE_SAVE_FILE = 4

The EditorFileDialog can select only one file. Accepting the window will save the file.


enum Access:

Access ACCESS_RESOURCES = 0

The EditorFileDialog can only view res:// directory contents.

Access ACCESS_USERDATA = 1

The EditorFileDialog can only view user:// directory contents.

Access ACCESS_FILESYSTEM = 2

The EditorFileDialog can view the entire local file system.


enum DisplayMode:

DisplayMode DISPLAY_THUMBNAILS = 0

The EditorFileDialog displays resources as thumbnails.

DisplayMode DISPLAY_LIST = 1

The EditorFileDialog displays resources as a list of filenames.


Property Descriptions

Access access = 0

The location from which the user may select a file, including res://, <