2013-05-22 01:45:24 +04:00
|
|
|
#include "PlatformUtils.h"
|
2013-05-22 02:19:29 +04:00
|
|
|
#include "boosty.h"
|
2013-05-22 01:45:24 +04:00
|
|
|
|
2014-02-17 00:13:21 +04:00
|
|
|
std::string PlatformUtils::pathSeparatorChar()
|
|
|
|
{
|
|
|
|
return ":";
|
|
|
|
}
|
|
|
|
|
2013-05-22 01:45:24 +04:00
|
|
|
std::string PlatformUtils::documentsPath()
|
|
|
|
{
|
2014-01-23 06:27:25 +04:00
|
|
|
const char *home = getenv("HOME");
|
|
|
|
if (home) {
|
|
|
|
fs::path docpath(home);
|
|
|
|
docpath = docpath / ".local" / "share";
|
|
|
|
return boosty::stringy(docpath);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
return "";
|
|
|
|
}
|
2013-05-22 01:45:24 +04:00
|
|
|
}
|