4 #include <msp/core/systemerror.h>
12 void mkdir(const Path &path, int mode)
14 if(::mkdir(path.str().c_str(), mode)==-1)
15 throw system_error("mkdir");
18 void rmdir(const Path &path)
20 if(::rmdir(path.str().c_str())==-1)
21 throw system_error("rmdir");
27 return ::getcwd(buf, sizeof(buf));
30 void chdir(const Path &path)
32 if(::chdir(path.str().c_str())==-1)
33 throw system_error("chdir");
38 const char *home = getenv("HOME");
44 Path get_user_data_dir(const string &appname)
47 throw invalid_argument("get_user_data_dir");
48 return get_home_dir()/("."+appname);