+1 vote

When creating file at "user://" in OS Linux, the file will be created: "/home/[user name]/.godot/app_userdata/[Your game]/[file name]".

Create folder ".godot" in "/home/[user name]/" not very good. Is there a possibility to create folder ".godot" in "/home/[user name]/.config"?

in Engine by (353 points)

1 Answer

0 votes

Godot is following the linux convention.
The ".config"-subfolder contains small config files of different applications but no user files. If you intend to store actual data creating a folder the way Godot does is the way to go.

I mean right now I have in my home folder subfolders like ".steam", ".adobe", ".dropbox", ".kde", ".gnome", ".java", ".thunderbird"... if those companies decide not to put their user folders inside the .config-folder you should probably follow their lead.

by (1,114 points)

I want to keep in ".config" configuration file of my game. Therefore, it is consistent with the intent of directories ".config".

There is a way to more flexibly distribute the saved files? I can access the root "/home/[user name]"?

For what I hear about conventions, everything should go under .config or .cache. The root folder of the user shouldn't have application-specific folder.

Given that in my home folder there are 33 such application-specific invisible folders including some generated by linux's very own applications and companies like Adobe or Mozilla I can safely say that you are misinformed.

But to answer your question, no, I don't think it's possible to access the home folder (or any location other than res:// and user:// for that matter) directly, since that would require OS specific code. If you absolutely need to do that you will have to write a C++ module for that.

For what I hear about conventions, everything should go under .config

Actually this is more correct implementation of the storage configuration program files.

Given that in my home folder there are 33 such application-specific invisible folders including some generated by linux's very own applications and companies like Adobe or Mozilla I can safely say that you are misinformed.

This is not a gross violation. But that is no reason for pride.

But to answer your question, no, I don't think it's possible

Thanks for the reply. It is sad that this is so.

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.