2017-09-13 04:42:36 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-02-14 21:18:53 +08:00
<class name= "EditorFileSystem" inherits= "Node" version= "4.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-13 04:42:36 +08:00
<brief_description >
Resource filesystem, as the editor sees it.
</brief_description>
<description >
This object holds information of all resources in the filesystem, their types, etc.
2020-04-15 04:09:21 +08:00
[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_resource_filesystem].
2017-09-13 04:42:36 +08:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "get_file_type" qualifiers= "const" >
2021-07-30 21:28:05 +08:00
<return type= "String" />
<argument index= "0" name= "path" type= "String" />
2017-09-13 04:42:36 +08:00
<description >
2021-08-13 00:38:57 +08:00
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].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_filesystem" >
2021-07-30 21:28:05 +08:00
<return type= "EditorFileSystemDirectory" />
2017-09-13 04:42:36 +08:00
<description >
2019-06-22 07:04:47 +08:00
Gets the root directory object.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_filesystem_path" >
2021-07-30 21:28:05 +08:00
<return type= "EditorFileSystemDirectory" />
<argument index= "0" name= "path" type= "String" />
2017-09-13 04:42:36 +08:00
<description >
2017-12-08 03:45:51 +08:00
Returns a view into the filesystem at [code]path[/code].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_scanning_progress" qualifiers= "const" >
2021-07-30 21:28:05 +08:00
<return type= "float" />
2017-09-13 04:42:36 +08:00
<description >
2019-05-24 10:15:43 +08:00
Returns the scan progress for 0 to 1 if the FS is being scanned.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "is_scanning" qualifiers= "const" >
2021-07-30 21:28:05 +08:00
<return type= "bool" />
2017-09-13 04:42:36 +08:00
<description >
2022-05-19 18:53:01 +08:00
Returns [code]true[/code] if the filesystem is being scanned.
2017-09-13 04:42:36 +08:00
</description>
</method>
2022-05-14 01:35:12 +08:00
<method name= "reimport_files" >
<return type= "void" />
<argument index= "0" name= "files" type= "PackedStringArray" />
<description >
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.
If the file type changed or the file was newly created, use [method update_file] or [method scan].
[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.
</description>
</method>
2017-09-13 04:42:36 +08:00
<method name= "scan" >
2021-07-30 21:28:05 +08:00
<return type= "void" />
2017-09-13 04:42:36 +08:00
<description >
Scan the filesystem for changes.
</description>
</method>
<method name= "scan_sources" >
2021-07-30 21:28:05 +08:00
<return type= "void" />
2017-09-13 04:42:36 +08:00
<description >
Check if the source of any imported resource changed.
</description>
</method>
<method name= "update_file" >
2021-07-30 21:28:05 +08:00
<return type= "void" />
<argument index= "0" name= "path" type= "String" />
2017-09-13 04:42:36 +08:00
<description >
2022-05-14 01:35:12 +08:00
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 [method reimport_files] or [method scan] methods.
2017-09-13 04:42:36 +08:00
</description>
</method>
2018-07-26 17:56:21 +08:00
<method name= "update_script_classes" >
2021-07-30 21:28:05 +08:00
<return type= "void" />
2018-07-26 17:56:21 +08:00
<description >
2020-03-04 02:21:21 +08:00
Scans the script files and updates the list of custom class names.
2018-07-26 17:56:21 +08:00
</description>
</method>
2017-09-13 04:42:36 +08:00
</methods>
<signals >
<signal name= "filesystem_changed" >
<description >
Emitted if the filesystem changed.
</description>
</signal>
<signal name= "resources_reimported" >
2021-07-30 21:28:05 +08:00
<argument index= "0" name= "resources" type= "PackedStringArray" />
2017-09-13 04:42:36 +08:00
<description >
2021-03-18 19:04:28 +08:00
Emitted if a resource is reimported.
2017-09-13 04:42:36 +08:00
</description>
</signal>
2018-11-23 08:06:24 +08:00
<signal name= "resources_reload" >
2021-07-30 21:28:05 +08:00
<argument index= "0" name= "resources" type= "PackedStringArray" />
2018-11-23 08:06:24 +08:00
<description >
2020-07-18 23:17:00 +08:00
Emitted if at least one resource is reloaded when the filesystem is scanned.
2018-11-23 08:06:24 +08:00
</description>
</signal>
2017-09-13 04:42:36 +08:00
<signal name= "sources_changed" >
2021-07-30 21:28:05 +08:00
<argument index= "0" name= "exist" type= "bool" />
2017-09-13 04:42:36 +08:00
<description >
Emitted if the source of any imported file changed.
</description>
</signal>
</signals>
</class>