-#include <shlobj.h>
+#include <windows.h>
#include <msp/core/mutex.h>
#include <msp/core/systemerror.h>
#include "dir.h"
throw system_error("SetCurrentDirectory");
}
-Path get_home_dir()
-{
- char home[MAX_PATH];
- if(SHGetFolderPath(0, CSIDL_PERSONAL, 0, 0, home)==S_OK)
- return home;
- return ".";
-}
-
-Path get_user_data_dir(const string &appname)
-{
- if(appname.empty())
- throw invalid_argument("get_user_data_dir");
- char datadir[MAX_PATH];
- if(SHGetFolderPath(0, CSIDL_LOCAL_APPDATA, 0, 0, datadir)==S_OK)
- return Path(datadir)/appname;
- return ".";
-}
-
} // namespace FS
} // namespace Msp