summaryrefslogtreecommitdiff
path: root/doc/classes/Directory.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Directory.xml')
-rw-r--r--doc/classes/Directory.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index 754fafadbe..2186f2adca 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Directory" inherits="Reference" category="Core" version="3.2">
+<class name="Directory" inherits="Reference" version="3.2">
<brief_description>
Type used to handle the filesystem.
</brief_description>
<description>
Directory type. It is used to manage directories and their content (not restricted to the project folder).
+ When creating a new [Directory], its default opened directory will be [code]res://[/code]. This may change in the future, so it is advised to always use [method open] to initialize your [Directory] where you want to operate, with explicit error checking.
Here is an example on how to iterate through the files of a directory:
[codeblock]
func dir_contents(path):
@@ -12,7 +13,7 @@
if dir.open(path) == OK:
dir.list_dir_begin()
var file_name = dir.get_next()
- while (file_name != ""):
+ while file_name != "":
if dir.current_is_dir():
print("Found directory: " + file_name)
else: