EditorFileDialog

    Category: Core

    Properties

    void ( String filter )
    void ( )
    VBoxContainer ( )
    voidinvalidate ( )

    Signals

    • dir_selected ( dir )

    Emitted when a directory is selected.


    • file_selected ( String path )

    Emitted when a file is selected.


    • files_selected ( paths )

    Emitted when multiple files are selected.

    enum Mode:

    • MODE_OPEN_FILES = 1 — The EditorFileDialog can select multiple files. Accepting the window will open all files.
    • MODE_OPEN_DIR = 2 — The EditorFileDialog can select only one directory. Accepting the window will open the directory.
    • MODE_OPEN_ANY = 3 — The EditorFileDialog can select a file or directory. Accepting the window will open it.
    • MODE_SAVE_FILE = 4 — The EditorFileDialog can select only one file. Accepting the window will save the file.

    enum Access:

    • ACCESS_RESOURCES = 0 — The EditorFileDialog can only view res:// directory contents.
    • ACCESS_USERDATA = 1 — The can only view user:// directory contents.
    • ACCESS_FILESYSTEM = 2 — The EditorFileDialog can view the entire local file system.

    • DISPLAY_THUMBNAILS = 0 — The EditorFileDialog displays resources as thumbnails.
    • DISPLAY_LIST = 1 — The EditorFileDialog displays resources as a list of filenames.

    Property Descriptions

    Setterset_access(value)
    Getterget_access()

    The location from which the user may select a file, including res://, user://, and the local file system.


    The currently occupied directory.


    • current_file
    Setterset_current_file(value)
    Getterget_current_file()

    The currently selected file.


    Setterset_current_path(value)
    Getterget_current_path()

    The file system path in the address bar.


    • disable_overwrite_warning

    If , the EditorFileDialog will not warn the user before overwriting files.


    Setterset_display_mode(value)
    Getterget_display_mode()

    The view format in which the EditorFileDialog displays resources to the user.


    • mode
    Setterset_mode(value)
    Getterget_mode()

    • bool show_hidden_files

    If true, hidden files and directories will be visible in the EditorFileDialog.

    • void add_filter ( 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 (*)”.


    Returns the 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.