|
static std::string | fromBase64 (std::string base64_string) |
|
static std::string | toBase64 (const std::string &tob64) |
|
static std::string | stripQuotes (const std::string &value) |
|
static std::string | addQuotes (const std::string &value) |
|
static std::string | extractField (const std::string &in, unsigned int field_id) |
|
static Json::Value | parseJSON (const std::string &json_str) |
|
static Json::Value | parseJSONFile (const boost::filesystem::path &filename) |
|
static std::string | jsonToStr (const Json::Value &json) |
|
static std::string | jsonToCanonicalStr (const Json::Value &json) |
|
static std::string | genPrettyName () |
|
static std::string | readFile (const boost::filesystem::path &filename, bool trim=false) |
|
static void | writeFile (const boost::filesystem::path &filename, const char *content, size_t size) |
|
static void | writeFile (const boost::filesystem::path &filename, const std::string &content, bool create_directories=true) |
|
static void | writeFile (const boost::filesystem::path &filename, const Json::Value &content, bool create_directories=true) |
|
static void | copyDir (const boost::filesystem::path &from, const boost::filesystem::path &to) |
|
static std::string | readFileFromArchive (std::istream &as, const std::string &filename, bool trim=false) |
|
static void | writeArchive (const std::map< std::string, std::string > &entries, std::ostream &as) |
|
static void | removeFileFromArchive (const boost::filesystem::path &archive_path, const std::string &filename) |
|
static Json::Value | getHardwareInfo () |
|
static Json::Value | getNetworkInfo () |
|
static std::string | getHostname () |
|
static std::string | randomUuid () |
|
static sockaddr_storage | ipGetSockaddr (int fd) |
|
static std::string | ipDisplayName (const sockaddr_storage &saddr) |
|
static int | ipPort (const sockaddr_storage &saddr) |
|
static int | shell (const std::string &command, std::string *output, bool include_stderr=false) |
|
static boost::filesystem::path | absolutePath (const boost::filesystem::path &root, const boost::filesystem::path &file) |
|
static void | createDirectories (const boost::filesystem::path &path, mode_t mode) |
|
static bool | createSecureDirectory (const boost::filesystem::path &path) |
|
static std::string | urlEncode (const std::string &input) |
|
static CURL * | curlDupHandleWrapper (CURL *curl_in, bool using_pkcs11) |
|
static std::vector< boost::filesystem::path > | getDirEntriesByExt (const boost::filesystem::path &dir_path, const std::string &ext) |
|
static void | setStorageRootPath (const std::string &storage_root_path) |
|
static boost::filesystem::path | getStorageRootPath () |
|
static void | setUserAgent (std::string user_agent) |
|
static const char * | getUserAgent () |
|
static void | setCaPath (boost::filesystem::path path) |
|
static const char * | getCaPath () |
|
Definition at line 13 of file utils.h.