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 -3
View File
@@ -5,8 +5,8 @@
#include <string>
#include "boost/asio/ip/tcp.hpp"
#include "boost/filesystem/path.hpp"
#include "webcc/fs.h"
#include "webcc/globals.h"
namespace webcc {
@@ -22,10 +22,10 @@ std::string HttpDate();
// Tell the size in bytes of the given file.
// Return kInvalidLength (-1) on failure.
std::size_t TellSize(const boost::filesystem::path& path);
std::size_t TellSize(const fs::path& path);
// Read entire file into string.
bool ReadFile(const boost::filesystem::path& path, std::string* output);
bool ReadFile(const fs::path& path, std::string* output);
// Dump the string data line by line to achieve more readability.
// Also limit the maximum size of the data to be dumped.