From c6b673185749c8bbfda73761e710f1749ccec162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 9 Jan 2020 10:18:43 +0100 Subject: [PATCH] Doc: Mention that Directory pre-opens res:// by default This may be considered a bug, so we might change that in the future. See #24149. --- doc/classes/Directory.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index 754fafadbef..91256359fb2 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -5,6 +5,7 @@ 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):