summaryrefslogtreecommitdiff
path: root/doc/classes/EditorFileSystem.xml
blob: 402efba34a9aba72a112bedb24082a328a8b4af4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorFileSystem" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
	<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.
		[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_resource_filesystem].
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="get_file_type" qualifiers="const">
			<return type="String" />
			<argument index="0" name="path" type="String" />
			<description>
				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].
			</description>
		</method>
		<method name="get_filesystem">
			<return type="EditorFileSystemDirectory" />
			<description>
				Gets the root directory object.
			</description>
		</method>
		<method name="get_filesystem_path">
			<return type="EditorFileSystemDirectory" />
			<argument index="0" name="path" type="String" />
			<description>
				Returns a view into the filesystem at [code]path[/code].
			</description>
		</method>
		<method name="get_scanning_progress" qualifiers="const">
			<return type="float" />
			<description>
				Returns the scan progress for 0 to 1 if the FS is being scanned.
			</description>
		</method>
		<method name="is_scanning" qualifiers="const">
			<return type="bool" />
			<description>
				Returns [code]true[/code] if the filesystem is being scanned.
			</description>
		</method>
		<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>
		<method name="scan">
			<return type="void" />
			<description>
				Scan the filesystem for changes.
			</description>
		</method>
		<method name="scan_sources">
			<return type="void" />
			<description>
				Check if the source of any imported resource changed.
			</description>
		</method>
		<method name="update_file">
			<return type="void" />
			<argument index="0" name="path" type="String" />
			<description>
				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.
			</description>
		</method>
		<method name="update_script_classes">
			<return type="void" />
			<description>
				Scans the script files and updates the list of custom class names.
			</description>
		</method>
	</methods>
	<signals>
		<signal name="filesystem_changed">
			<description>
				Emitted if the filesystem changed.
			</description>
		</signal>
		<signal name="resources_reimported">
			<argument index="0" name="resources" type="PackedStringArray" />
			<description>
				Emitted if a resource is reimported.
			</description>
		</signal>
		<signal name="resources_reload">
			<argument index="0" name="resources" type="PackedStringArray" />
			<description>
				Emitted if at least one resource is reloaded when the filesystem is scanned.
			</description>
		</signal>
		<signal name="sources_changed">
			<argument index="0" name="exist" type="bool" />
			<description>
				Emitted if the source of any imported file changed.
			</description>
		</signal>
	</signals>
</class>