mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
254 lines
12 KiB
ReStructuredText
254 lines
12 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_EditorFileSystem:
|
|
|
|
EditorFileSystem
|
|
================
|
|
|
|
**Hereda:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
Sistema de archivos de recursos, como lo ve el editor.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
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 :ref:`EditorInterface.get_resource_filesystem()<class_EditorInterface_method_get_resource_filesystem>`.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Métodos
|
|
--------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`get_file_type<class_EditorFileSystem_method_get_file_type>`\ (\ path\: :ref:`String<class_String>`\ ) |const| |
|
|
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_filesystem<class_EditorFileSystem_method_get_filesystem>`\ (\ ) |
|
|
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_filesystem_path<class_EditorFileSystem_method_get_filesystem_path>`\ (\ path\: :ref:`String<class_String>`\ ) |
|
|
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_scanning_progress<class_EditorFileSystem_method_get_scanning_progress>`\ (\ ) |const| |
|
|
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_scanning<class_EditorFileSystem_method_is_scanning>`\ (\ ) |const| |
|
|
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`reimport_files<class_EditorFileSystem_method_reimport_files>`\ (\ files\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |
|
|
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`scan<class_EditorFileSystem_method_scan>`\ (\ ) |
|
|
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`scan_sources<class_EditorFileSystem_method_scan_sources>`\ (\ ) |
|
|
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`update_file<class_EditorFileSystem_method_update_file>`\ (\ path\: :ref:`String<class_String>`\ ) |
|
|
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Señales
|
|
--------------
|
|
|
|
.. _class_EditorFileSystem_signal_filesystem_changed:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**filesystem_changed**\ (\ ) :ref:`🔗<class_EditorFileSystem_signal_filesystem_changed>`
|
|
|
|
Emitida si el sistema de archivos cambió.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_signal_resources_reimported:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**resources_reimported**\ (\ resources\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorFileSystem_signal_resources_reimported>`
|
|
|
|
Emitida si un recurso es reimportado.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_signal_resources_reimporting:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**resources_reimporting**\ (\ resources\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorFileSystem_signal_resources_reimporting>`
|
|
|
|
Emitida antes de que se vuelva a importar un recurso.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_signal_resources_reload:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**resources_reload**\ (\ resources\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorFileSystem_signal_resources_reload>`
|
|
|
|
Emitida si al menos un recurso se recarga cuando el sistema de archivos es escaneado.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_signal_script_classes_updated:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**script_classes_updated**\ (\ ) :ref:`🔗<class_EditorFileSystem_signal_script_classes_updated>`
|
|
|
|
Emitida cuando se actualiza la lista de clases de script globales.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_signal_sources_changed:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**sources_changed**\ (\ exist\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorFileSystem_signal_sources_changed>`
|
|
|
|
Emitida si la fuente de cualquier archivo importado cambia.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descripciones de Métodos
|
|
------------------------------------------------
|
|
|
|
.. _class_EditorFileSystem_method_get_file_type:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`String<class_String>` **get_file_type**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_EditorFileSystem_method_get_file_type>`
|
|
|
|
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"``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_method_get_filesystem:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_filesystem**\ (\ ) :ref:`🔗<class_EditorFileSystem_method_get_filesystem>`
|
|
|
|
Obtiene el objeto del directorio raíz.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_method_get_filesystem_path:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_filesystem_path**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorFileSystem_method_get_filesystem_path>`
|
|
|
|
Devuelve una vista del sistema de archivos en ``path``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_method_get_scanning_progress:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **get_scanning_progress**\ (\ ) |const| :ref:`🔗<class_EditorFileSystem_method_get_scanning_progress>`
|
|
|
|
Devuelve el progreso del escaneo de 0 a 1 si el FS está siendo escaneado.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_method_is_scanning:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **is_scanning**\ (\ ) |const| :ref:`🔗<class_EditorFileSystem_method_is_scanning>`
|
|
|
|
Devuelve ``true`` si se está escaneando el sistema de archivos.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_method_reimport_files:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **reimport_files**\ (\ files\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorFileSystem_method_reimport_files>`
|
|
|
|
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 :ref:`update_file()<class_EditorFileSystem_method_update_file>` or :ref:`scan()<class_EditorFileSystem_method_scan>`.
|
|
|
|
\ **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and :ref:`Node._process()<class_Node_private_method__process>`, will occur during the import process due to progress bar updates. Avoid calls to :ref:`reimport_files()<class_EditorFileSystem_method_reimport_files>` or :ref:`scan()<class_EditorFileSystem_method_scan>` while an import is in progress.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_method_scan:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **scan**\ (\ ) :ref:`🔗<class_EditorFileSystem_method_scan>`
|
|
|
|
Escanea el sistema de archivos en busca de cambios.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_method_scan_sources:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **scan_sources**\ (\ ) :ref:`🔗<class_EditorFileSystem_method_scan_sources>`
|
|
|
|
Comprueba si ha cambiado la fuente de algún recurso importado.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_EditorFileSystem_method_update_file:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **update_file**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorFileSystem_method_update_file>`
|
|
|
|
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 :ref:`reimport_files()<class_EditorFileSystem_method_reimport_files>` or :ref:`scan()<class_EditorFileSystem_method_scan>` methods.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (Normalmente, este método debería ser sobreescrito por el usuario para que tenga algún efecto.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (Este método no tiene efectos secundarios. No modifica ninguna de las variables miembro de la instancia.)`
|
|
.. |vararg| replace:: :abbr:`vararg (Este método permite agregar cualquier número de argumentos después de los descritos aquí.)`
|
|
.. |constructor| replace:: :abbr:`constructor (Este método se utiliza para construir un tipo.)`
|
|
.. |static| replace:: :abbr:`static (Este método no necesita una instancia para ser llamado, por lo que puede llamarse directamente utilizando el nombre de la clase.)`
|
|
.. |operator| replace:: :abbr:`operator (Este método describe un operador válido para usar con este tipo como operando izquierdo.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (Este valor es un entero compuesto como una máscara de bits de las siguientes banderas.)`
|
|
.. |void| replace:: :abbr:`void (Sin valor de retorno.)`
|