class_editorfilesystem.rst 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the EditorFileSystem.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_EditorFileSystem:
  6. EditorFileSystem
  7. ================
  8. **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. Resource filesystem, as the editor sees it.
  10. Description
  11. -----------
  12. This object holds information of all resources in the filesystem, their types, etc.
  13. **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_filesystem<class_EditorInterface_method_get_resource_filesystem>`.
  14. Methods
  15. -------
  16. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`String<class_String>` | :ref:`get_file_type<class_EditorFileSystem_method_get_file_type>` **(** :ref:`String<class_String>` path **)** |const| |
  18. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_filesystem<class_EditorFileSystem_method_get_filesystem>` **(** **)** |
  20. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_filesystem_path<class_EditorFileSystem_method_get_filesystem_path>` **(** :ref:`String<class_String>` path **)** |
  22. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`get_scanning_progress<class_EditorFileSystem_method_get_scanning_progress>` **(** **)** |const| |
  24. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`is_scanning<class_EditorFileSystem_method_is_scanning>` **(** **)** |const| |
  26. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`scan<class_EditorFileSystem_method_scan>` **(** **)** |
  28. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`scan_sources<class_EditorFileSystem_method_scan_sources>` **(** **)** |
  30. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`update_file<class_EditorFileSystem_method_update_file>` **(** :ref:`String<class_String>` path **)** |
  32. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`update_script_classes<class_EditorFileSystem_method_update_script_classes>` **(** **)** |
  34. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+
  35. Signals
  36. -------
  37. .. _class_EditorFileSystem_signal_filesystem_changed:
  38. - **filesystem_changed** **(** **)**
  39. Emitted if the filesystem changed.
  40. ----
  41. .. _class_EditorFileSystem_signal_resources_reimported:
  42. - **resources_reimported** **(** :ref:`PoolStringArray<class_PoolStringArray>` resources **)**
  43. Emitted if a resource is reimported.
  44. ----
  45. .. _class_EditorFileSystem_signal_resources_reload:
  46. - **resources_reload** **(** :ref:`PoolStringArray<class_PoolStringArray>` resources **)**
  47. Emitted if at least one resource is reloaded when the filesystem is scanned.
  48. ----
  49. .. _class_EditorFileSystem_signal_sources_changed:
  50. - **sources_changed** **(** :ref:`bool<class_bool>` exist **)**
  51. Emitted if the source of any imported file changed.
  52. Method Descriptions
  53. -------------------
  54. .. _class_EditorFileSystem_method_get_file_type:
  55. - :ref:`String<class_String>` **get_file_type** **(** :ref:`String<class_String>` path **)** |const|
  56. 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"``.
  57. ----
  58. .. _class_EditorFileSystem_method_get_filesystem:
  59. - :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_filesystem** **(** **)**
  60. Gets the root directory object.
  61. ----
  62. .. _class_EditorFileSystem_method_get_filesystem_path:
  63. - :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_filesystem_path** **(** :ref:`String<class_String>` path **)**
  64. Returns a view into the filesystem at ``path``.
  65. ----
  66. .. _class_EditorFileSystem_method_get_scanning_progress:
  67. - :ref:`float<class_float>` **get_scanning_progress** **(** **)** |const|
  68. Returns the scan progress for 0 to 1 if the FS is being scanned.
  69. ----
  70. .. _class_EditorFileSystem_method_is_scanning:
  71. - :ref:`bool<class_bool>` **is_scanning** **(** **)** |const|
  72. Returns ``true`` of the filesystem is being scanned.
  73. ----
  74. .. _class_EditorFileSystem_method_scan:
  75. - void **scan** **(** **)**
  76. Scan the filesystem for changes.
  77. ----
  78. .. _class_EditorFileSystem_method_scan_sources:
  79. - void **scan_sources** **(** **)**
  80. Check if the source of any imported resource changed.
  81. ----
  82. .. _class_EditorFileSystem_method_update_file:
  83. - void **update_file** **(** :ref:`String<class_String>` path **)**
  84. Update a file information. Call this if an external program (not Godot) modified the file.
  85. ----
  86. .. _class_EditorFileSystem_method_update_script_classes:
  87. - void **update_script_classes** **(** **)**
  88. Scans the script files and updates the list of custom class names.
  89. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  90. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  91. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`