2 #include <msp/core/systemerror.h>
10 void mkdir(const Path &path, int)
12 if(!CreateDirectory(path.str().c_str(), NULL))
13 throw system_error("CreateDirectory");
16 void rmdir(const Path &path)
18 if(!RemoveDirectory(path.str().c_str()))
19 throw system_error("RemoveDirectory");
25 if(SHGetFolderPath(0, CSIDL_PERSONAL, 0, 0, home)==S_OK)
30 Path get_user_data_dir(const string &appname)
32 char datadir[MAX_PATH];
33 if(SHGetFolderPath(0, CSIDL_LOCAL_APPDATA, 0, 0, datadir)==S_OK)
34 return Path(datadir)/appname;