Make a folder in absolute file path?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Chevi

I currently have a custom user dir to go on a folder that is “AppData\Roaming\CheviRPG” the problem is that is I give my project to my friends they would have to manually create that “CheviRPG” folder, is there a way to make a folder in “%AppData%”?

Nevermind I used

   var d =
	if not d.dir_exists("C:/Users/<username>/AppData/Roaming/CheviRPG/"):

and it worked fine

Chevi | 2020-08-09 21:55

:bust_in_silhouette: Reply From: tuon

You should use the more portable “user://” prefix instead. That will automatically map to the AppData folder for the game and be usable in other environments such as Mac and Linux. For more information on data paths please see the Godot docs for data paths.