EditorFileDialog¶
Inherits: ConfirmationDialog < AcceptDialog < WindowDialog < Popup < Control < CanvasItem < Node < Object
Category: Core
Brief Description¶
Properties¶
| Access | access |
| String | current_dir |
| String | current_file |
| String | current_path |
| bool | disable_overwrite_warning |
| DisplayMode | display_mode |
| Mode | mode |
| bool | show_hidden_files |
Methods¶
| void | add_filter ( String filter ) |
| void | clear_filters ( ) |
| 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 ( PoolStringArray paths )
Emitted when multiple files are selected.
Enumerations¶
enum Mode:
- MODE_OPEN_FILE = 0 — The
EditorFileDialogcan select only one file. Accepting the window will open the file. - MODE_OPEN_FILES = 1 — The
EditorFileDialogcan select multiple files. Accepting the window will open all files. - MODE_OPEN_DIR = 2 — The
EditorFileDialogcan select only one directory. Accepting the window will open the directory. - MODE_OPEN_ANY = 3 — The
EditorFileDialogcan select a file or directory. Accepting the window will open it. - MODE_SAVE_FILE = 4 — The
EditorFileDialogcan select only one file. Accepting the window will save the file.
enum Access:
- ACCESS_RESOURCES = 0 — The
EditorFileDialogcan only viewres://directory contents. - ACCESS_USERDATA = 1 — The
EditorFileDialogcan only viewuser://directory contents. - ACCESS_FILESYSTEM = 2 — The
EditorFileDialogcan view the entire local file system.
enum DisplayMode:
- DISPLAY_THUMBNAILS = 0 — The
EditorFileDialogdisplays resources as thumbnails. - DISPLAY_LIST = 1 — The
EditorFileDialogdisplays resources as a list of filenames.
Property Descriptions¶
- Access access
| Setter | set_access(value) |
| Getter | get_access() |
The location from which the user may select a file, including res://, user://, and the local file system.
- String current_dir
| Setter | set_current_dir(value) |
| Getter | get_current_dir() |
The currently occupied directory.
- String current_file
| Setter | set_current_file(value) |
| Getter | get_current_file() |
The currently selected file.
- String current_path
| Setter | set_current_path(value) |
| Getter | get_current_path() |
The file system path in the address bar.
- bool disable_overwrite_warning
| Setter | set_disable_overwrite_warning(value) |
| Getter | is_overwrite_warning_disabled() |
If true, the EditorFileDialog will not warn the user before overwriting files.
- DisplayMode display_mode
| Setter | set_display_mode(value) |
| Getter | get_display_mode() |
The view format in which the EditorFileDialog displays resources to the user.
- Mode mode
| Setter | set_mode(value) |
| Getter | get_mode() |
The purpose of the EditorFileDialog. Changes allowed behaviors.
| Setter | set_show_hidden_files(value) |
| Getter | is_showing_hidden_files() |
If true, hidden files and directories will be visible in the EditorFileDialog.
Method Descriptions¶
- void add_filter ( String filter )
Adds a comma-delimited file extension filter option to the EditorFileDialog with an optional semi-colon-delimited label.
Example: “*.tscn, *.scn; Scenes”, results in filter text “Scenes (*.tscn, *.scn)”.
- void clear_filters ( )
Removes all filters except for “All Files (*)”.
- VBoxContainer get_vbox ( )
Returns the VBoxContainer used to display the file system.
- void invalidate ( )
Notify the EditorFileDialog that its view of the data is no longer accurate. Updates the view contents on next view update.