add a cmake option to switch between std and boost filesystem

This commit is contained in:
Chunting Gu
2021-05-27 11:15:08 +08:00
parent 39719c4ded
commit df96f969bc
31 changed files with 227 additions and 195 deletions
+2 -4
View File
@@ -9,8 +9,6 @@
#include "webcc/gzip.h"
#endif
namespace bfs = boost::filesystem;
namespace webcc {
RequestPtr RequestBuilder::operator()() {
@@ -67,7 +65,7 @@ RequestBuilder& RequestBuilder::AcceptGzip(bool gzip) {
#endif // WEBCC_ENABLE_GZIP
RequestBuilder& RequestBuilder::File(const bfs::path& path,
RequestBuilder& RequestBuilder::File(const fs::path& path,
bool infer_media_type,
std::size_t chunk_size) {
body_.reset(new FileBody{ path, chunk_size });
@@ -80,7 +78,7 @@ RequestBuilder& RequestBuilder::File(const bfs::path& path,
}
RequestBuilder& RequestBuilder::FormFile(const std::string& name,
const bfs::path& path,
const fs::path& path,
const std::string& media_type) {
assert(!name.empty());
return Form(FormPart::NewFile(name, path, media_type));