openscad/src/PlatformUtils-posix.cc

21 lines
339 B
C++

#include "PlatformUtils.h"
#include "boosty.h"
std::string PlatformUtils::pathSeparatorChar()
{
return ":";
}
std::string PlatformUtils::documentsPath()
{
const char *home = getenv("HOME");
if (home) {
fs::path docpath(home);
docpath = docpath / ".local" / "share";
return boosty::stringy(docpath);
}
else {
return "";
}
}