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 (3.x) #49732

Merged
merged 1 commit into from
Jun 19, 2021

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jun 19, 2021

3.x version of #48544.

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.

I tested this PR on 3.x with the following code sample and it works as expected:

func _ready():
	print(OS.get_data_dir())  # /home/hugo/.local/share
	print(OS.get_config_dir())  # /home/hugo/.config
	print(OS.get_cache_dir())  # /home/hugo/.cache

@Calinou Calinou requested review from a team as code owners June 19, 2021 06:59
@Calinou Calinou changed the title Expose OS data directory getter methods Expose OS data directory getter methods (3.x) Jun 19, 2021
@Calinou Calinou added this to the 3.4 milestone Jun 19, 2021
@akien-mga
Copy link
Member

The added doc is not alphabetically ordered.

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 force-pushed the expose-data-dirs-3.x branch from 6aa3576 to 21ad630 Compare June 19, 2021 07:28
@akien-mga akien-mga merged commit 09c2bd5 into godotengine:3.x 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.

2 participants