EditorFileSystem
Resource filesystem, as the editor sees it.
EditorFileSystem.swift:23class EditorFileSystem
This object holds information of all resources in the filesystem, their types, etc.
This object emits the following signals:
Superclasses
class Node
Base class for all scene objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
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 Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
class Signal1
Signal support.
class Signal2
Signal support.
class Signal3
Signal support.
Type members
Instance members
var filesystemChanged: SimpleSignal
Emitted if the filesystem changed.
var resourcesReimported: Signal2
Emitted if a resource is reimported.
var resourcesReload: Signal3
Emitted if at least one resource is reloaded when the filesystem is scanned.
var scriptClassesUpdated: SimpleSignal
Emitted when the list of global script classes gets updated.
var sourcesChanged: Signal1
Emitted if the source of any imported file changed.
func getFileType(path: String
) -> String Returns the resource type of the file, given the full path. This returns a string such as
"Resource"
or"GDScript"
, not a file extension such as".gd"
.func getFilesystem(
) -> EditorFileSystemDirectory? Gets the root directory object.
func getFilesystemPath(String
) -> EditorFileSystemDirectory? Returns a view into the filesystem at
path
.func getScanningProgress(
) -> Double Returns the scan progress for 0 to 1 if the FS is being scanned.
func isScanning(
) -> Bool Returns
true
if the filesystem is being scanned.func reimportFiles(PackedStringArray
) Reimports a set of files. Call this if these files or their
.import
files were directly edited by script or an external program.func scan(
) Scan the filesystem for changes.
func scanSources(
) Check if the source of any imported resource changed.
func updateFile(path: String
) Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program.