EditorFileSystem

Hereda: Node < Object

Sistema de archivos de recursos, como lo ve el editor.

Descripción

Este objeto contiene información de todos los recursos del sistema de archivos, sus tipos, etc.

Nota: Esta clase no debe ser instanciada directamente. En su lugar, accede al singleton usando EditorInterface.get_resource_filesystem().

Métodos

String

get_file_type(path: String) const

EditorFileSystemDirectory

get_filesystem()

EditorFileSystemDirectory

get_filesystem_path(path: String)

float

get_scanning_progress() const

bool

is_scanning() const

void

reimport_files(files: PackedStringArray)

void

scan()

void

scan_sources()

void

update_file(path: String)


Señales

filesystem_changed() 🔗

Emitida si el sistema de archivos cambió.


resources_reimported(resources: PackedStringArray) 🔗

Emitida si un recurso es reimportado.


resources_reimporting(resources: PackedStringArray) 🔗

Emitida antes de que se vuelva a importar un recurso.


resources_reload(resources: PackedStringArray) 🔗

Emitida si al menos un recurso se recarga cuando el sistema de archivos es escaneado.


script_classes_updated() 🔗

Emitida cuando se actualiza la lista de clases de script globales.


sources_changed(exist: bool) 🔗

Emitida si la fuente de cualquier archivo importado cambia.


Descripciones de Métodos

String get_file_type(path: String) const 🔗

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".


EditorFileSystemDirectory get_filesystem() 🔗

Obtiene el objeto del directorio raíz.


EditorFileSystemDirectory get_filesystem_path(path: String) 🔗

Devuelve una vista del sistema de archivos en path.


float get_scanning_progress() const 🔗

Devuelve el progreso del escaneo de 0 a 1 si el FS está siendo escaneado.


bool is_scanning() const 🔗

Devuelve true si se está escaneando el sistema de archivos.


void reimport_files(files: PackedStringArray) 🔗

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 update_file() 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 reimport_files() or scan() while an import is in progress.


void scan() 🔗

Escanea el sistema de archivos en busca de cambios.


void scan_sources() 🔗

Comprueba si ha cambiado la fuente de algún recurso importado.


void update_file(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 reimport_files() or scan() methods.