Changeset View
Changeset View
Standalone View
Standalone View
src/util.h
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | |||||
fs::path GetPidFile(); | fs::path GetPidFile(); | ||||
void CreatePidFile(const fs::path &path, pid_t pid); | void CreatePidFile(const fs::path &path, pid_t pid); | ||||
#endif | #endif | ||||
#ifdef WIN32 | #ifdef WIN32 | ||||
fs::path GetSpecialFolderPath(int nFolder, bool fCreate = true); | fs::path GetSpecialFolderPath(int nFolder, bool fCreate = true); | ||||
#endif | #endif | ||||
void runCommand(const std::string &strCommand); | void runCommand(const std::string &strCommand); | ||||
/** | |||||
* Most paths passed as configuration arguments are treated as relative to | |||||
* the datadir if they are not absolute. | |||||
* | |||||
* @param path The path to be conditionally prefixed with datadir. | |||||
* @param net_specific Forwarded to GetDataDir(). | |||||
* @return The normalized path. | |||||
*/ | |||||
fs::path AbsPathForConfigVal(const fs::path &path, bool net_specific = true); | |||||
inline bool IsSwitchChar(char c) { | inline bool IsSwitchChar(char c) { | ||||
#ifdef WIN32 | #ifdef WIN32 | ||||
return c == '-' || c == '/'; | return c == '-' || c == '/'; | ||||
#else | #else | ||||
return c == '-'; | return c == '-'; | ||||
#endif | #endif | ||||
} | } | ||||
▲ Show 20 Lines • Show All 248 Lines • Show Last 20 Lines |