Quellcode durchsuchen

Merge pull request #66234 from KoBeWi/dir_access_denied

Fix wrong DirAccess example
Rémi Verschelde vor 3 Jahren
Ursprung
Commit
e5c544750c
1 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen
  1. 2 3
      doc/classes/DirAccess.xml

+ 2 - 3
doc/classes/DirAccess.xml

@@ -9,11 +9,10 @@
 		Most of the methods have a static alternative that can be used without creating a [DirAccess]. Static methods only support absolute paths (including [code]res://[/code] and [code]user://[/code]).
 		[codeblock]
 		# Standard
-		var dir = Directory.new()
-		dir.open("user://levels")
+		var dir = DirAccess.open("user://levels")
 		dir.make_dir("world1")
 		# Static
-		Directory.make_dir_absolute("user://levels/world1")
+		DirAccess.make_dir_absolute("user://levels/world1")
 		[/codeblock]
 		[b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. Use [ResourceLoader] to access imported resources.
 		Here is an example on how to iterate through the files of a directory: