5 extern "C" unsigned get_home_dir(char *, unsigned);
6 extern "C" unsigned get_application_support_dir(char *, unsigned);
14 unsigned len = ::get_home_dir(buf, sizeof(buf));
16 return string(buf, len);
18 const char *home = getenv("HOME");
25 Path get_user_data_dir(const string &appname)
28 unsigned len = get_application_support_dir(buf, sizeof(buf));
30 return Path(string(buf, len))/appname;
31 return get_home_dir()/"Library"/"Application Support"/appname;