Fix wrong DirAccess example
This commit is contained in:
parent
0b06f8b0bd
commit
185be4a788
|
@ -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]).
|
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]
|
[codeblock]
|
||||||
# Standard
|
# Standard
|
||||||
var dir = Directory.new()
|
var dir = DirAccess.open("user://levels")
|
||||||
dir.open("user://levels")
|
|
||||||
dir.make_dir("world1")
|
dir.make_dir("world1")
|
||||||
# Static
|
# Static
|
||||||
Directory.make_dir_absolute("user://levels/world1")
|
DirAccess.make_dir_absolute("user://levels/world1")
|
||||||
[/codeblock]
|
[/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.
|
[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:
|
Here is an example on how to iterate through the files of a directory:
|
||||||
|
|
Loading…
Reference in New Issue