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
+3 -5
View File
@@ -6,8 +6,7 @@
#include <utility>
#include <vector>
#include "boost/filesystem/path.hpp"
#include "webcc/fs.h"
#include "webcc/globals.h"
namespace webcc {
@@ -158,8 +157,7 @@ public:
// Construct a file part.
// The file name will be extracted from path.
// The media type, if not provided, will be inferred from file extension.
static FormPartPtr NewFile(const std::string& name,
const boost::filesystem::path& path,
static FormPartPtr NewFile(const std::string& name, const fs::path& path,
const std::string& media_type = "");
// API: SERVER
@@ -230,7 +228,7 @@ private:
std::string name_;
// The path of the file to post.
boost::filesystem::path path_;
fs::path path_;
// The original local file name.
// E.g., "baby.jpg".