From 368335bf0a55647eb533b6bc2b783392a7014934 Mon Sep 17 00:00:00 2001 From: Wierdox <104049283+Wierdox@users.noreply.github.com> Date: Tue, 11 Mar 2025 17:47:43 -0700 Subject: [PATCH] Fix incomplete description for ResourceLoader.list_directory() --- doc/classes/ResourceLoader.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index f8096dc7b14..ae9c837b8cd 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -79,7 +79,13 @@ - Lists a directory (as example: "res://assets/enemies"), returning all resources contained within. The resource files are the original file names as visible in the editor before exporting. + Lists a directory, returning all resources and subdirectories contained within. The resource files have the original file names as visible in the editor before exporting. The directories have [code]"/"[/code] appended. + [codeblock] + print(ResourceLoader.list_directory("res://assets/enemies/slime")) + # Prints ["extra_data/", "model.gltf", "model.tscn", "model_slime.png"] + [/codeblock] + [b]Note:[/b] The order of files and directories returned by this method is not deterministic, and can vary between operating systems. + [b]Note:[/b] To normally traverse the filesystem, see [DirAccess].