Add libhv and test http client

This commit is contained in:
Guilherme Werner
2023-12-03 16:38:19 -03:00
parent 7297e2e383
commit 4fb0abd834
102 changed files with 60661 additions and 26 deletions

28
vendor/libhv/include/hv/hpath.h vendored Normal file
View File

@ -0,0 +1,28 @@
#ifndef HV_PATH_H_
#define HV_PATH_H_
#include <string> // for std::string
#include "hexport.h"
class HV_EXPORT HPath {
public:
static bool exists(const char* path);
static bool isdir(const char* path);
static bool isfile(const char* path);
static bool islink(const char* path);
// filepath = /mnt/share/image/test.jpg
// basename = test.jpg
// dirname = /mnt/share/image
// filename = test
// suffixname = jpg
static std::string basename(const std::string& filepath);
static std::string dirname(const std::string& filepath);
static std::string filename(const std::string& filepath);
static std::string suffixname(const std::string& filepath);
static std::string join(const std::string& dir, const std::string& filename);
};
#endif // HV_PATH_H_