gcString getRelativePath(const gcString &path) { gcString wd = UTIL::LIN::getAppPath(L""); if (path.find(wd) == 0) return path.substr(wd.size()+1, std::string::npos); return path; }
static gcTime parseTimeStamp(gcString &str) { //Boost throws exception if no time string. :( if (str.find('T') == std::string::npos) { str = str.substr(0, 8) + "T" + str.substr(8); } return gcTime::from_iso_string(str); }
gcString getAbsPath(const gcString& path) { if (path.size() == 0 || path[0] == '/') return path; gcString wd = UTIL::LIN::getAppPath(L""); if (path.find(wd) == std::string::npos) return wd + "/" + path; return path; }