XString Root(const XString& path) { size_t index = path.find_last_of("/\\"); return (XString::npos == index) ? XString() : path.substr(0,index+1); }