0.2.0-dev Download ZIP
117 lines ·4.4 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="EditorFileSystem" inherits="Node" api_type="editor" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Resource filesystem, as the editor sees it. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | This object holds information of all resources in the filesystem, their types, etc. |
| 8 | [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_resource_filesystem]. |
| 9 | </description> |
| 10 | <tutorials> |
| 11 | </tutorials> |
| 12 | <methods> |
| 13 | <method name="get_file_type" qualifiers="const"> |
| 14 | <return type="String" /> |
| 15 | <param index="0" name="path" type="String" /> |
| 16 | <description> |
| 17 | Returns the resource type of the file, given the full path. This returns a string such as [code]"Resource"[/code] or [code]"GDScript"[/code], [i]not[/i] a file extension such as [code]".gd"[/code]. |
| 18 | </description> |
| 19 | </method> |
| 20 | <method name="get_filesystem"> |
| 21 | <return type="EditorFileSystemDirectory" /> |
| 22 | <description> |
| 23 | Gets the root directory object. |
| 24 | </description> |
| 25 | </method> |
| 26 | <method name="get_filesystem_path"> |
| 27 | <return type="EditorFileSystemDirectory" /> |
| 28 | <param index="0" name="path" type="String" /> |
| 29 | <description> |
| 30 | Returns a view into the filesystem at [param path]. |
| 31 | </description> |
| 32 | </method> |
| 33 | <method name="get_scanning_progress" qualifiers="const"> |
| 34 | <return type="float" /> |
| 35 | <description> |
| 36 | Returns the scan progress for 0 to 1 if the FS is being scanned. |
| 37 | </description> |
| 38 | </method> |
| 39 | <method name="is_importing" qualifiers="const"> |
| 40 | <return type="bool" /> |
| 41 | <description> |
| 42 | Returns [code]true[/code] if resources are currently being imported. |
| 43 | </description> |
| 44 | </method> |
| 45 | <method name="is_scanning" qualifiers="const"> |
| 46 | <return type="bool" /> |
| 47 | <description> |
| 48 | Returns [code]true[/code] if the filesystem is being scanned. |
| 49 | </description> |
| 50 | </method> |
| 51 | <method name="reimport_files"> |
| 52 | <return type="void" /> |
| 53 | <param index="0" name="files" type="PackedStringArray" /> |
| 54 | <description> |
| 55 | Reimports a set of files. Call this if these files or their [code].import[/code] files were directly edited by script or an external program. |
| 56 | If the file type changed or the file was newly created, use [method update_file] or [method scan]. |
| 57 | [b]Note:[/b] This function blocks until the import is finished. However, the main loop iteration, including timers and [method Node._process], will occur during the import process due to progress bar updates. Avoid calls to [method reimport_files] or [method scan] while an import is in progress. |
| 58 | </description> |
| 59 | </method> |
| 60 | <method name="scan"> |
| 61 | <return type="void" /> |
| 62 | <description> |
| 63 | Scan the filesystem for changes. |
| 64 | </description> |
| 65 | </method> |
| 66 | <method name="scan_sources"> |
| 67 | <return type="void" /> |
| 68 | <description> |
| 69 | Check if the source of any imported resource changed. |
| 70 | </description> |
| 71 | </method> |
| 72 | <method name="update_file"> |
| 73 | <return type="void" /> |
| 74 | <param index="0" name="path" type="String" /> |
| 75 | <description> |
| 76 | 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. |
| 77 | This will not import the file. To reimport, call [method reimport_files] or [method scan] methods. |
| 78 | </description> |
| 79 | </method> |
| 80 | </methods> |
| 81 | <signals> |
| 82 | <signal name="filesystem_changed"> |
| 83 | <description> |
| 84 | Emitted if the filesystem changed. |
| 85 | </description> |
| 86 | </signal> |
| 87 | <signal name="resources_reimported"> |
| 88 | <param index="0" name="resources" type="PackedStringArray" /> |
| 89 | <description> |
| 90 | Emitted if a resource is reimported. |
| 91 | </description> |
| 92 | </signal> |
| 93 | <signal name="resources_reimporting"> |
| 94 | <param index="0" name="resources" type="PackedStringArray" /> |
| 95 | <description> |
| 96 | Emitted before a resource is reimported. |
| 97 | </description> |
| 98 | </signal> |
| 99 | <signal name="resources_reload"> |
| 100 | <param index="0" name="resources" type="PackedStringArray" /> |
| 101 | <description> |
| 102 | Emitted if at least one resource is reloaded when the filesystem is scanned. |
| 103 | </description> |
| 104 | </signal> |
| 105 | <signal name="script_classes_updated"> |
| 106 | <description> |
| 107 | Emitted when the list of global script classes gets updated. |
| 108 | </description> |
| 109 | </signal> |
| 110 | <signal name="sources_changed"> |
| 111 | <param index="0" name="exist" type="bool" /> |
| 112 | <description> |
| 113 | Emitted if the source of any imported file changed. |
| 114 | </description> |
| 115 | </signal> |
| 116 | </signals> |
| 117 | </class> |