Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
Access
EditorFileDialog.swift:45enum Access
Cases
case resources
The
EditorFileDialog
can only viewres://
directory contents.case userdata
The
EditorFileDialog
can only viewuser://
directory contents.case filesystem
The
EditorFileDialog
can view the entire local file system.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (24) members.
Types
enum DisplayMode
enum FileMode
class Signal1
Signal support.
class Signal2
Signal support.
class Signal3
Signal support.
Type members
Instance members
var access: EditorFileDialog.Access
The location from which the user may select a file, including
res://
,user://
, and the local file system.var currentDir: String
The currently occupied directory.
var currentFile: String
The currently selected file.
var currentPath: String
The file system path in the address bar.
var dirSelected: Signal3
Emitted when a directory is selected.
var disableOverwriteWarning: Bool
If
true
, theEditorFileDialog
will not warn the user before overwriting files.var displayMode: EditorFileDialog.DisplayMode
The view format in which the
EditorFileDialog
displays resources to the user.var fileMode: EditorFileDialog.FileMode
The dialog’s open or save mode, which affects the selection behavior. See
FileMode
.var fileSelected: Signal1
Emitted when a file is selected.
var filesSelected: Signal2
Emitted when multiple files are selected.
var filters: PackedStringArray
The available file type filters. For example, this shows only
.png
and.gd
files:set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))
. Multiple file types can also be specified in a single filter."*.png, *.jpg, *.jpeg ; Supported Images"
will show both PNG and JPEG files when selected.var showHiddenFiles: Bool
If
true
, hidden files and directories will be visible in theEditorFileDialog
. This property is synchronized withEditorSettings/filesystem/fileDialog/showHiddenFiles
.func addFilter(String, description: String
) Adds a comma-delimited file name
filter
option to theEditorFileDialog
with an optionaldescription
, which restricts what files can be picked.func addSideMenu(Control?, title: String
) Adds the given
menu
to the side of the file dialog with the giventitle
text on top. Only one side menu is allowed.func clearFilters(
) Removes all filters except for “All Files (*)”.
func getLineEdit(
) -> LineEdit? Returns the LineEdit for the selected file.
func getVbox(
) -> VBoxContainer? Returns the
VBoxContainer
used to display the file system.func invalidate(
) Notify the
EditorFileDialog
that its view of the data is no longer accurate. Updates the view contents on next view update.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.