EditorFileSystem

package
v0.0.0-...-e10d1cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

This object holds information of all resources in the filesystem, their types, etc.

Note: This class shouldn't be instantiated directly. Instead, access the singleton using EditorInterface.GetResourceFilesystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsEditorFileSystem() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsEditorFileSystem

func (self *Extension[T]) AsEditorFileSystem() Instance

func (*Extension[T]) AsNode

func (self *Extension[T]) AsNode() Node.Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.EditorFileSystem

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsEditorFileSystem

func (self Instance) AsEditorFileSystem() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) GetFileType

func (self Instance) 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 (Instance) GetFilesystem

func (self Instance) GetFilesystem() EditorFileSystemDirectory.Instance

Gets the root directory object.

func (Instance) GetFilesystemPath

func (self Instance) GetFilesystemPath(path string) EditorFileSystemDirectory.Instance

Returns a view into the filesystem at 'path'.

func (Instance) GetScanningProgress

func (self Instance) GetScanningProgress() Float.X

Returns the scan progress for 0 to 1 if the FS is being scanned.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) IsScanning

func (self Instance) IsScanning() bool

Returns true if the filesystem is being scanned.

func (Instance) OnFilesystemChanged

func (self Instance) OnFilesystemChanged(cb func(), flags ...Signal.Flags)

func (Instance) OnResourcesReimported

func (self Instance) OnResourcesReimported(cb func(resources []string), flags ...Signal.Flags)

func (Instance) OnResourcesReimporting

func (self Instance) OnResourcesReimporting(cb func(resources []string), flags ...Signal.Flags)

func (Instance) OnResourcesReload

func (self Instance) OnResourcesReload(cb func(resources []string), flags ...Signal.Flags)

func (Instance) OnScriptClassesUpdated

func (self Instance) OnScriptClassesUpdated(cb func(), flags ...Signal.Flags)

func (Instance) OnSourcesChanged

func (self Instance) OnSourcesChanged(cb func(exist bool), flags ...Signal.Flags)

func (Instance) ReimportFiles

func (self Instance) ReimportFiles(files []string)

Reimports a set of files. Call this if these files or their .import files were directly edited by script or an external program.

If the file type changed or the file was newly created, use UpdateFile or Scan.

Note: This function blocks until the import is finished. However, the main loop iteration, including timers and Node.Process, will occur during the import process due to progress bar updates. Avoid calls to ReimportFiles or Scan while an import is in progress.

func (Instance) Scan

func (self Instance) Scan()

Scan the filesystem for changes.

func (Instance) ScanSources

func (self Instance) ScanSources()

Check if the source of any imported resource changed.

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) UpdateFile

func (self Instance) 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.

This will not import the file. To reimport, call ReimportFiles or Scan methods.

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL