Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose OS data directory getter methods #48544

Merged
merged 1 commit into from
Jun 19, 2021

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented May 7, 2021

master version of #49732.

This can be used by editor plugins and non-game applications to store data in the correct directories according to the XDG Base Directory specification.

Testing code

func _ready():
	print(OS.get_data_dir())
	print(OS.get_config_dir())
	print(OS.get_cache_dir())

Output (Linux)

/home/hugo/.local/share
/home/hugo/.config
/home/hugo/.cache

This closes godotengine/godot-proposals#2696.

@Calinou Calinou requested review from a team as code owners May 7, 2021 17:40
@Calinou Calinou added cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement topic:porting labels May 7, 2021
@Calinou Calinou added this to the 4.0 milestone May 7, 2021
@akien-mga
Copy link
Member

Needs a rebase.

This can be used by editor plugins and non-game applications to
store data in the correct directories according to the
XDG Base Directory specification.
@Calinou Calinou removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jun 19, 2021
@akien-mga akien-mga merged commit d587ea6 into godotengine:master Jun 19, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose OS data directory getter methods to scripting
2 participants