class_editorfilesystemdirectory.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.2/doc/classes/EditorFileSystemDirectory.xml.
  6. .. _class_EditorFileSystemDirectory:
  7. EditorFileSystemDirectory
  8. =========================
  9. **Inherits:** :ref:`Object<class_Object>`
  10. A directory for the resource filesystem.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A more generalized, low-level variation of the directory concept.
  15. .. rst-class:: classref-reftable-group
  16. Methods
  17. -------
  18. .. table::
  19. :widths: auto
  20. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`int<class_int>` | :ref:`find_dir_index<class_EditorFileSystemDirectory_method_find_dir_index>` **(** :ref:`String<class_String>` name **)** |const| |
  22. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`find_file_index<class_EditorFileSystemDirectory_method_find_file_index>` **(** :ref:`String<class_String>` name **)** |const| |
  24. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`String<class_String>` | :ref:`get_file<class_EditorFileSystemDirectory_method_get_file>` **(** :ref:`int<class_int>` idx **)** |const| |
  26. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`get_file_count<class_EditorFileSystemDirectory_method_get_file_count>` **(** **)** |const| |
  28. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`get_file_import_is_valid<class_EditorFileSystemDirectory_method_get_file_import_is_valid>` **(** :ref:`int<class_int>` idx **)** |const| |
  30. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`String<class_String>` | :ref:`get_file_path<class_EditorFileSystemDirectory_method_get_file_path>` **(** :ref:`int<class_int>` idx **)** |const| |
  32. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`String<class_String>` | :ref:`get_file_script_class_extends<class_EditorFileSystemDirectory_method_get_file_script_class_extends>` **(** :ref:`int<class_int>` idx **)** |const| |
  34. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`String<class_String>` | :ref:`get_file_script_class_name<class_EditorFileSystemDirectory_method_get_file_script_class_name>` **(** :ref:`int<class_int>` idx **)** |const| |
  36. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`StringName<class_StringName>` | :ref:`get_file_type<class_EditorFileSystemDirectory_method_get_file_type>` **(** :ref:`int<class_int>` idx **)** |const| |
  38. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`String<class_String>` | :ref:`get_name<class_EditorFileSystemDirectory_method_get_name>` **(** **)** |
  40. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_parent<class_EditorFileSystemDirectory_method_get_parent>` **(** **)** |
  42. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`String<class_String>` | :ref:`get_path<class_EditorFileSystemDirectory_method_get_path>` **(** **)** |const| |
  44. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_subdir<class_EditorFileSystemDirectory_method_get_subdir>` **(** :ref:`int<class_int>` idx **)** |
  46. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`get_subdir_count<class_EditorFileSystemDirectory_method_get_subdir_count>` **(** **)** |const| |
  48. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. .. rst-class:: classref-section-separator
  50. ----
  51. .. rst-class:: classref-descriptions-group
  52. Method Descriptions
  53. -------------------
  54. .. _class_EditorFileSystemDirectory_method_find_dir_index:
  55. .. rst-class:: classref-method
  56. :ref:`int<class_int>` **find_dir_index** **(** :ref:`String<class_String>` name **)** |const|
  57. Returns the index of the directory with name ``name`` or ``-1`` if not found.
  58. .. rst-class:: classref-item-separator
  59. ----
  60. .. _class_EditorFileSystemDirectory_method_find_file_index:
  61. .. rst-class:: classref-method
  62. :ref:`int<class_int>` **find_file_index** **(** :ref:`String<class_String>` name **)** |const|
  63. Returns the index of the file with name ``name`` or ``-1`` if not found.
  64. .. rst-class:: classref-item-separator
  65. ----
  66. .. _class_EditorFileSystemDirectory_method_get_file:
  67. .. rst-class:: classref-method
  68. :ref:`String<class_String>` **get_file** **(** :ref:`int<class_int>` idx **)** |const|
  69. Returns the name of the file at index ``idx``.
  70. .. rst-class:: classref-item-separator
  71. ----
  72. .. _class_EditorFileSystemDirectory_method_get_file_count:
  73. .. rst-class:: classref-method
  74. :ref:`int<class_int>` **get_file_count** **(** **)** |const|
  75. Returns the number of files in this directory.
  76. .. rst-class:: classref-item-separator
  77. ----
  78. .. _class_EditorFileSystemDirectory_method_get_file_import_is_valid:
  79. .. rst-class:: classref-method
  80. :ref:`bool<class_bool>` **get_file_import_is_valid** **(** :ref:`int<class_int>` idx **)** |const|
  81. Returns ``true`` if the file at index ``idx`` imported properly.
  82. .. rst-class:: classref-item-separator
  83. ----
  84. .. _class_EditorFileSystemDirectory_method_get_file_path:
  85. .. rst-class:: classref-method
  86. :ref:`String<class_String>` **get_file_path** **(** :ref:`int<class_int>` idx **)** |const|
  87. Returns the path to the file at index ``idx``.
  88. .. rst-class:: classref-item-separator
  89. ----
  90. .. _class_EditorFileSystemDirectory_method_get_file_script_class_extends:
  91. .. rst-class:: classref-method
  92. :ref:`String<class_String>` **get_file_script_class_extends** **(** :ref:`int<class_int>` idx **)** |const|
  93. Returns the base class of the script class defined in the file at index ``idx``. If the file doesn't define a script class using the ``class_name`` syntax, this will return an empty string.
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _class_EditorFileSystemDirectory_method_get_file_script_class_name:
  97. .. rst-class:: classref-method
  98. :ref:`String<class_String>` **get_file_script_class_name** **(** :ref:`int<class_int>` idx **)** |const|
  99. Returns the name of the script class defined in the file at index ``idx``. If the file doesn't define a script class using the ``class_name`` syntax, this will return an empty string.
  100. .. rst-class:: classref-item-separator
  101. ----
  102. .. _class_EditorFileSystemDirectory_method_get_file_type:
  103. .. rst-class:: classref-method
  104. :ref:`StringName<class_StringName>` **get_file_type** **(** :ref:`int<class_int>` idx **)** |const|
  105. Returns the resource type of the file at index ``idx``. This returns a string such as ``"Resource"`` or ``"GDScript"``, *not* a file extension such as ``".gd"``.
  106. .. rst-class:: classref-item-separator
  107. ----
  108. .. _class_EditorFileSystemDirectory_method_get_name:
  109. .. rst-class:: classref-method
  110. :ref:`String<class_String>` **get_name** **(** **)**
  111. Returns the name of this directory.
  112. .. rst-class:: classref-item-separator
  113. ----
  114. .. _class_EditorFileSystemDirectory_method_get_parent:
  115. .. rst-class:: classref-method
  116. :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_parent** **(** **)**
  117. Returns the parent directory for this directory or ``null`` if called on a directory at ``res://`` or ``user://``.
  118. .. rst-class:: classref-item-separator
  119. ----
  120. .. _class_EditorFileSystemDirectory_method_get_path:
  121. .. rst-class:: classref-method
  122. :ref:`String<class_String>` **get_path** **(** **)** |const|
  123. Returns the path to this directory.
  124. .. rst-class:: classref-item-separator
  125. ----
  126. .. _class_EditorFileSystemDirectory_method_get_subdir:
  127. .. rst-class:: classref-method
  128. :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_subdir** **(** :ref:`int<class_int>` idx **)**
  129. Returns the subdirectory at index ``idx``.
  130. .. rst-class:: classref-item-separator
  131. ----
  132. .. _class_EditorFileSystemDirectory_method_get_subdir_count:
  133. .. rst-class:: classref-method
  134. :ref:`int<class_int>` **get_subdir_count** **(** **)** |const|
  135. Returns the number of subdirectories in this directory.
  136. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  137. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  138. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  139. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  140. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  141. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  142. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`