Files
godot-docs-l10n/classes/uk/class_editorfilesystem.rst

254 lines
13 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_EditorFileSystem:
EditorFileSystem
================
**Успадковує:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
Серверна файлова система, як редактор бачить його.
.. rst-class:: classref-introduction-group
Опис
--------
Цей об'єкт має інформацію про всі ресурси в файловій системі, їх типи тощо.
\ **Примітка:** Цей клас не повинен бути миттєвим. Замість, доступ до Єдиного редактора :ref:`EditorInterface.get_resource_filesystem()<class_EditorInterface_method_get_resource_filesystem>`.
.. rst-class:: classref-reftable-group
Методи
------------
.. 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
Сигнали
--------------
.. _class_EditorFileSystem_signal_filesystem_changed:
.. rst-class:: classref-signal
**filesystem_changed**\ (\ ) :ref:`🔗<class_EditorFileSystem_signal_filesystem_changed>`
Увімкнено, якщо файлова система змінилася.
.. 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>`
Випробувано, якщо ресурс перевозиться.
.. 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>`
Перед тим як перевозиться ресурс.
.. 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>`
Випробувано, якщо не менше одного ресурсу перезавантажено при скануванні файлової системи.
.. 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>`
Увімкнути, коли список глобальних класів скриптів оновлюється.
.. 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>`
Увімкнено, якщо джерело будь-якого імпортного файлу змінено.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описи методів
--------------------------
.. _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>`
Повертаємо ресурсний тип файлу, враховуючи повний шлях. Це повертає рядок, такі як ``"Resource"`` або ``"GDScript"``, *not* розширення файлів, таких як ``.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>`
Отримує об'єкт кореневих каталогів.
.. 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>`
Повертає вид на файлову систему через ``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>`
Повертає прогрес сканування для 0 до 1, якщо FS сканується.
.. 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>`
Повертає ``true``, якщо сканується файлова система.
.. 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>`
Реімпортує набір файлів. Викликайте цей метод, якщо ці файли або їхні файли ``.import`` були безпосередньо відредаговані скриптом або зовнішньою програмою.
Якщо тип файлу змінився або файл було створено заново, використовуйте :ref:`update_file()<class_EditorFileSystem_method_update_file>` або :ref:`scan()<class_EditorFileSystem_method_scan>`.
\ **Примітка:** Ця функція блокує роботу до завершення імпорту. Однак, основна ітерація циклу, включаючи таймери і :ref:`Node._process()<class_Node_private_method__process>`, відбуватиметься під час процесу імпорту через оновлення індикатора виконання. Уникайте викликів :ref:`reimport_files()<class_EditorFileSystem_method_reimport_files>` або :ref:`scan()<class_EditorFileSystem_method_scan>` під час імпорту.
.. rst-class:: classref-item-separator
----
.. _class_EditorFileSystem_method_scan:
.. rst-class:: classref-method
|void| **scan**\ (\ ) :ref:`🔗<class_EditorFileSystem_method_scan>`
Сканування файлової системи для змін.
.. rst-class:: classref-item-separator
----
.. _class_EditorFileSystem_method_scan_sources:
.. rst-class:: classref-method
|void| **scan_sources**\ (\ ) :ref:`🔗<class_EditorFileSystem_method_scan_sources>`
Перевірте, чи змінено джерело будь-якого імпортного ресурсу.
.. 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>`
Додати файл до існуючого каталогу або запланувати оновлення інформації про файл при перезапуску редактора. Можна використовувати для оновлення текстових файлів, збережених зовнішньою програмою.
При цьому файл не буде імпортовано. Для повторного імпорту викличте методи :ref:`reimport_files()<class_EditorFileSystem_method_reimport_files>` або :ref:`scan()<class_EditorFileSystem_method_scan>`.
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
.. |void| replace:: :abbr:`void (Значення не повертається.)`