0 votes

I cant find any infomation on trying to save on to the users file system, I want to create a simple settings folder in the documents folder, but I cant figure out what the correct path is, for example this is the path I have for my system "/home/name/Documents/" but I dont know how to make it so name is global since name is different on every system and I seem cant access, what is user:// when trying to save it doesnt save anything.

Godot version 3.3.2
in Engine by (153 points)

1 Answer

+1 vote
Best answer

var docs = OS.get_environment("HOME") + "/Documents"

by (4,644 points)
selected by

Does this skip the user part of the file path and goes straight to the documents folder, I will try when I get home thanks!

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.