replace boost filesystem with std filesystem; upgrade gtest and find it using cmake.

This commit is contained in:
Chunting Gu
2020-02-15 12:04:51 +08:00
parent 7e3da65e73
commit 7e7ab1c1e8
72 changed files with 233 additions and 31551 deletions
+3 -2
View File
@@ -191,7 +191,8 @@ FormPartPtr FormPart::New(const std::string& name, std::string&& data,
return form_part;
}
FormPartPtr FormPart::NewFile(const std::string& name, const Path& path,
FormPartPtr FormPart::NewFile(const std::string& name,
const std::filesystem::path& path,
const std::string& media_type) {
auto form_part = std::make_shared<FormPart>();
@@ -201,7 +202,7 @@ FormPartPtr FormPart::NewFile(const std::string& name, const Path& path,
// Determine file name from file path.
// TODO: encoding
form_part->file_name_ = path.filename().string(std::codecvt_utf8<wchar_t>());
form_part->file_name_ = path.filename().string();
// Determine media type from file extension.
// TODO: Default to "application/text"?