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
+3 -9
View File
@@ -5,16 +5,10 @@
#include <string>
#include "boost/asio/ip/tcp.hpp"
#include "boost/filesystem/path.hpp"
#include "webcc/globals.h"
// Avoid include <filesystem> in the header.
namespace std {
namespace filesystem {
class path;
} // namespace filesystem
} // namespace std
namespace webcc {
namespace utility {
@@ -28,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 std::filesystem::path& path);
std::size_t TellSize(const boost::filesystem::path& path);
// Read entire file into string.
bool ReadFile(const std::filesystem::path& path, std::string* output);
bool ReadFile(const boost::filesystem::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.