Struct FileDialog
Dialog for selecting files or directories in the filesystem.
struct FileDialog
;
FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks.
Properties
Name | Type | Description |
---|---|---|
access [get, set]
|
FileDialog | The file system access scope. See enum Access constants.
|
currentDir [get, set]
|
String | The current working directory of the file dialog. |
currentFile [get, set]
|
String | The currently selected file of the file dialog. |
currentPath [get, set]
|
String | The currently selected file path of the file dialog. |
filters [get, set]
|
PoolArray!(godot.core.string.String) | The available file type filters. For example, this shows only and files: set_filters(PoolStringArray(class="pln">D "*.png ; PNG Images","*.gd ; GDScript Files")) .
|
mode [get, set]
|
FileDialog | The dialog's open or save mode, which affects the selection behavior. See enum Mode constants.
|
modeOverridesTitle [get, set]
|
bool | If true , changing the Mode 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").
|
showHiddenFiles [get, set]
|
bool | If true , the dialog will show hidden files.
|
Methods
Name | Description |
---|---|
_actionPressed
|
|
_cancelPressed
|
|
_dirEntered
|
|
_fileEntered
|
|
_filterSelected
|
|
_goUp
|
|
_makeDir
|
|
_makeDirConfirm
|
|
_saveConfirmPressed
|
|
_selectDrive
|
|
_treeItemActivated
|
|
_treeMultiSelected
|
|
_treeSelected
|
|
_unhandledInput
|
|
_updateDir
|
|
_updateFileList
|
|
_updateFileName
|
|
addFilter
|
Adds filter as a custom filter; filter should be of the form "filename.extension ; Description" . For example, "*.png ; PNG Images" .
|
clearFilters
|
Clear all the added filters in the dialog. |
deselectItems
|
Clear currently selected items in the dialog. |
getAccess
|
|
getCurrentDir
|
|
getCurrentFile
|
|
getCurrentPath
|
|
getFilters
|
|
getLineEdit
|
Returns the LineEdit for the selected file. |
getMode
|
|
getVbox
|
Returns the vertical box container of the dialog, custom controls can be added to it. |
invalidate
|
Invalidate and update the current dialog content list. |
isModeOverridingTitle
|
|
isShowingHiddenFiles
|
|
setAccess
|
|
setCurrentDir
|
|
setCurrentFile
|
|
setCurrentPath
|
|
setFilters
|
|
setMode
|
|
setModeOverridesTitle
|
|
setShowHiddenFiles
|
Enums
Name | Description |
---|---|
Access
|
|
Constants
|
|
Mode
|