### Author Topic: Standart game data folder on Linux/ OsX?  (Read 3568 times)

0 Members and 1 Guest are viewing this topic.

#### c4ooo

• Posts: 252
• Rating: +10/-1
• The impossible chemical compound.
##### Standart game data folder on Linux/ OsX?
« on: January 03, 2016, 02:40:36 pm »
What is the standard game folder on PCs running linux/mac?
EG lets say i have a meathod creatdir(String s) that creates a dir. What would path would a pass to it on linux/OsX?
On windows it i would do createdir("forgot/<user>/documenta/Games").

Edit: Someone just told me that for linux, "creatdir("~/games")" would work, but what is the full path?
-German Kuznetsov
The impossible chemical compound.

#### Hooloovoo

• Posts: 225
• Rating: +22/-0
##### Re: Standart game data folder on Linux/ OsX?
« Reply #1 on: January 03, 2016, 03:06:09 pm »
~/games means (user's home dir)/games, which would normally look like /home/username/games

I have more often seen game data in ~/.local/share/$programname according to http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html, programs should use$XDG_DATA_HOME if it is set, or if it is not set, use ~/.local/share/programname
"My world is Black & White. But if I blink fast enough, I see it in Grayscale." -tr1p1ea
Spoiler For some of the calcs I own:

(actually I have quite a few more than this, but I don't feel like making bars for them all.)