+1 vote

I'm trying to open a path with the systems filemanager. Therefore I use OS.shell_open(path) and it works well (at least on Windows) for absolute strings like:


My problem is that I want to open up the user directory directly without knowing what the user name is. I tried something like:


But it doesn't work. Is there a possiblity to get the path to the user://-directory? Is there a cross-platform way to achieve that?

in Engine by (1,026 points)

1 Answer

+5 votes
Best answer



String get_user_data_dir ( ) const
Returns the absolute directory path where user data is written (user://).
by (9,702 points)
selected by

I must have been blind o.0
Awesome, thank you!

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.