:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EditorFileSystem.xml. .. _class_EditorFileSystem: EditorFileSystem ================ **Inherits:** :ref:`Node` **<** :ref:`Object` Resource filesystem, as the editor sees it. .. rst-class:: classref-introduction-group Description ----------- 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 :ref:`EditorInterface.get_resource_filesystem`. .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_file_type`\ (\ path\: :ref:`String`\ ) |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorFileSystemDirectory` | :ref:`get_filesystem`\ (\ ) | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorFileSystemDirectory` | :ref:`get_filesystem_path`\ (\ path\: :ref:`String`\ ) | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_scanning_progress`\ (\ ) |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_scanning`\ (\ ) |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`reimport_files`\ (\ files\: :ref:`PackedStringArray`\ ) | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`scan`\ (\ ) | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`scan_sources`\ (\ ) | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`update_file`\ (\ path\: :ref:`String`\ ) | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorFileSystem_signal_filesystem_changed: .. rst-class:: classref-signal **filesystem_changed**\ (\ ) :ref:`🔗` Emitted if the filesystem changed. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_signal_resources_reimported: .. rst-class:: classref-signal **resources_reimported**\ (\ resources\: :ref:`PackedStringArray`\ ) :ref:`🔗` Emitted if a resource is reimported. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_signal_resources_reimporting: .. rst-class:: classref-signal **resources_reimporting**\ (\ resources\: :ref:`PackedStringArray`\ ) :ref:`🔗` Emitted before a resource is reimported. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_signal_resources_reload: .. rst-class:: classref-signal **resources_reload**\ (\ resources\: :ref:`PackedStringArray`\ ) :ref:`🔗` Emitted if at least one resource is reloaded when the filesystem is scanned. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_signal_script_classes_updated: .. rst-class:: classref-signal **script_classes_updated**\ (\ ) :ref:`🔗` Emitted when the list of global script classes gets updated. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_signal_sources_changed: .. rst-class:: classref-signal **sources_changed**\ (\ exist\: :ref:`bool`\ ) :ref:`🔗` Emitted if the source of any imported file changed. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorFileSystem_method_get_file_type: .. rst-class:: classref-method :ref:`String` **get_file_type**\ (\ path\: :ref:`String`\ ) |const| :ref:`🔗` 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` **get_filesystem**\ (\ ) :ref:`🔗` Gets the root directory object. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_method_get_filesystem_path: .. rst-class:: classref-method :ref:`EditorFileSystemDirectory` **get_filesystem_path**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Returns a view into the filesystem at ``path``. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_method_get_scanning_progress: .. rst-class:: classref-method :ref:`float` **get_scanning_progress**\ (\ ) |const| :ref:`🔗` Returns the scan progress for 0 to 1 if the FS is being scanned. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_method_is_scanning: .. rst-class:: classref-method :ref:`bool` **is_scanning**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the filesystem is being scanned. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_method_reimport_files: .. rst-class:: classref-method |void| **reimport_files**\ (\ files\: :ref:`PackedStringArray`\ ) :ref:`🔗` 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` or :ref:`scan`. \ **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and :ref:`Node._process`, will occur during the import process due to progress bar updates. Avoid calls to :ref:`reimport_files` or :ref:`scan` while an import is in progress. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_method_scan: .. rst-class:: classref-method |void| **scan**\ (\ ) :ref:`🔗` Scan the filesystem for changes. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_method_scan_sources: .. rst-class:: classref-method |void| **scan_sources**\ (\ ) :ref:`🔗` Check if the source of any imported resource changed. .. rst-class:: classref-item-separator ---- .. _class_EditorFileSystem_method_update_file: .. rst-class:: classref-method |void| **update_file**\ (\ path\: :ref:`String`\ ) :ref:`🔗` 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` or :ref:`scan` methods. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`