1 #include <msp/core/application.h>
6 extern "C" unsigned get_home_dir(char *, unsigned);
7 extern "C" unsigned get_application_support_dir(char *, unsigned);
15 unsigned len = ::get_home_dir(buf, sizeof(buf));
17 return string(buf, len);
19 const char *home = getenv("HOME");
26 Path get_user_data_dir()
28 const string &appname = Application::get_name();
30 throw logic_error("no application name");
33 unsigned len = get_application_support_dir(buf, sizeof(buf));
35 return Path(string(buf, len))/appname;
36 return get_home_dir()/"Library"/"Application Support"/appname;