switch back to boost::filesystem to avoid the requirement of c++17

This commit is contained in:
Chunting Gu
2020-09-07 19:01:31 +08:00
parent e7f88da2b2
commit 84476f75f7
31 changed files with 175 additions and 192 deletions
+4 -2
View File
@@ -9,6 +9,8 @@
#include "webcc/gzip.h"
#endif
namespace bfs = boost::filesystem;
namespace webcc {
RequestPtr RequestBuilder::operator()() {
@@ -52,7 +54,7 @@ RequestPtr RequestBuilder::operator()() {
return request;
}
RequestBuilder& RequestBuilder::File(const std::filesystem::path& path,
RequestBuilder& RequestBuilder::File(const bfs::path& path,
bool infer_media_type,
std::size_t chunk_size) {
body_.reset(new FileBody{ path, chunk_size });
@@ -65,7 +67,7 @@ RequestBuilder& RequestBuilder::File(const std::filesystem::path& path,
}
RequestBuilder& RequestBuilder::FormFile(const std::string& name,
const std::filesystem::path& path,
const bfs::path& path,
const std::string& media_type) {
assert(!name.empty());
return Form(FormPart::NewFile(name, path, media_type));