Documentation
¶
Overview ¶
Package EditorFileSystem provides methods for working with EditorFileSystem object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsEditorFileSystem() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) GetFileType(path string) string
- func (self Instance) GetFilesystem() [1]gdclass.EditorFileSystemDirectory
- func (self Instance) GetFilesystemPath(path string) [1]gdclass.EditorFileSystemDirectory
- func (self Instance) GetScanningProgress() Float.X
- func (self Instance) IsScanning() bool
- func (self Instance) OnFilesystemChanged(cb func())
- func (self Instance) OnResourcesReimported(cb func(resources []string))
- func (self Instance) OnResourcesReimporting(cb func(resources []string))
- func (self Instance) OnResourcesReload(cb func(resources []string))
- func (self Instance) OnScriptClassesUpdated(cb func())
- func (self Instance) OnSourcesChanged(cb func(exist bool))
- func (self Instance) ReimportFiles(files []string)
- func (self Instance) Scan()
- func (self Instance) ScanSources()
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) UpdateFile(path string)
- func (self Instance) Virtual(name string) reflect.Value
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 Instance ¶
type Instance [1]gdclass.EditorFileSystem
This object holds information of all resources in the filesystem, their types, etc. [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_resource_filesystem].
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsEditorFileSystem ¶
func (Instance) GetFileType ¶
Returns the resource type of the file, given the full path. This returns a string such as [code]"Resource"[/code] or [code]"GDScript"[/code], [i]not[/i] a file extension such as [code]".gd"[/code].
func (Instance) GetFilesystem ¶
func (self Instance) GetFilesystem() [1]gdclass.EditorFileSystemDirectory
Gets the root directory object.
func (Instance) GetFilesystemPath ¶
func (self Instance) GetFilesystemPath(path string) [1]gdclass.EditorFileSystemDirectory
Returns a view into the filesystem at [param path].
func (Instance) GetScanningProgress ¶
Returns the scan progress for 0 to 1 if the FS is being scanned.
func (Instance) IsScanning ¶
Returns [code]true[/code] if the filesystem is being scanned.
func (Instance) OnFilesystemChanged ¶
func (self Instance) OnFilesystemChanged(cb func())
func (Instance) OnResourcesReimported ¶
func (Instance) OnResourcesReimporting ¶
func (Instance) OnResourcesReload ¶
func (Instance) OnScriptClassesUpdated ¶
func (self Instance) OnScriptClassesUpdated(cb func())
func (Instance) OnSourcesChanged ¶
func (Instance) ReimportFiles ¶
Reimports a set of files. Call this if these files or their [code].import[/code] files were directly edited by script or an external program. If the file type changed or the file was newly created, use [method update_file] or [method scan]. [b]Note:[/b] This function blocks until the import is finished. However, the main loop iteration, including timers and [method Node._process], will occur during the import process due to progress bar updates. Avoid calls to [method reimport_files] or [method scan] while an import is in progress.
func (Instance) ScanSources ¶
func (self Instance) ScanSources()
Check if the source of any imported resource changed.
func (*Instance) UnsafePointer ¶
func (Instance) UpdateFile ¶
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 [method reimport_files] or [method scan] methods.