Merge pull request #34944 from akien-mga/doc-directory-preopened

Doc: Mention that Directory pre-opens res:// by default
This commit is contained in:
Rémi Verschelde 2020-01-09 12:32:31 +01:00 committed by GitHub
commit 2718179bf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@
</brief_description> </brief_description>
<description> <description>
Directory type. It is used to manage directories and their content (not restricted to the project folder). 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: Here is an example on how to iterate through the files of a directory:
[codeblock] [codeblock]
func dir_contents(path): func dir_contents(path):