12namespace fs = std::filesystem;
30 const char* userProfile = std::getenv(
"USERPROFILE");
31 return fs::path(userProfile ? userProfile :
"C:\\Users\\Default") /
"Documents";
33 const char* home = std::getenv(
"HOME");
34 return fs::path(home ? home :
"/Users/Default") /
"Documents";
36 const char* home = std::getenv(
"HOME");
37 return fs::path(home ? home :
"/home/default") /
"Documents";
43 if (!fs::exists(path))
45 fs::create_directories(path);
46 std::cout <<
"[PathManager] Created folder: " << path << std::endl;
103 return getExternalPath() /
"localtunnel" /
"node_modules" /
"localtunnel" /
"bin" /
"client";
153 return s.find(
'\\') != std::string::npos || s.find(
'/') != std::string::npos;
156 static bool isUNC(
const std::string& s)
159 return (s.rfind(
"\\\\", 0) == 0) || (s.rfind(
"//", 0) == 0);
165 return s.size() > 2 && std::isalpha(
static_cast<unsigned char>(s[0])) && s[1] ==
':' && (s[2] ==
'\\' || s[2] ==
'/');
171 return s.size() > 1 && std::isalpha(
static_cast<unsigned char>(s[0])) && s[1] ==
':' && (s.size() == 2 || (s[2] !=
'\\' && s[2] !=
'/'));
177 std::filesystem::path p(s);
static fs::path baseDocumentsPath
static fs::path getMarkersPath()
static fs::path getRootDirectory()
static bool isFilenameOnly(const std::string &s)
static fs::path getExecutableRoot()
static fs::path getConfigPath()
static fs::path getGameTablesPath()
static bool isPathLike(const std::string &s)
static fs::path getLocalTunnelControllerPath()
static fs::path getNodeExePath()
static void ensureDirectories()
static fs::path getExternalPath()
static bool hasDirSep(const std::string &s)
static fs::path getDocumentsFolder()
static fs::path getLocalTunnelClientPath()
static fs::path executableDir
static bool isUNC(const std::string &s)
static fs::path getResPath()
static bool isAbsolutePath(const std::string &s)
static fs::path getUpnpcExePath()
static bool isDriveRelative(const std::string &s)
static bool isDriveAbsolute(const std::string &s)
static void createIfNotExists(const fs::path &path)
static fs::path getExecutableDirectory()
static fs::path getMapsPath()
static fs::path getShaderPath()
static fs::path getBoardsPath(std::string gametable_name)
static fs::path getNotesPath()
static fs::path getCertsPath()