+7 votes

I want to "user://" to create a new directory. I see document: link

I can't find a method that would create a new directory. If possible, please show a minimal code example.

asked Jun 7, 2016 in Engine by DimitriyPS (353 points)

1 Answer

+14 votes
Best answer
func _ready():
    var dir = Directory.new()
    dir.open("user://")
    dir.make_dir("sad")

It works.

answered Jun 7, 2016 by eaglecat (483 points)
selected Jun 7, 2016 by DimitriyPS
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.