replace boost filesystem with std filesystem; upgrade gtest and find it using cmake.
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
// A client posting multipart form data.
|
||||
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
|
||||
#include "boost/filesystem.hpp"
|
||||
|
||||
#include "webcc/client_session.h"
|
||||
#include "webcc/logger.h"
|
||||
|
||||
namespace sfs = std::filesystem;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
if (argc < 2) {
|
||||
std::cout << "usage: form_client <upload_dir> [url]" << std::endl;
|
||||
@@ -22,7 +23,7 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
WEBCC_LOG_INIT("", webcc::LOG_CONSOLE);
|
||||
|
||||
const webcc::Path upload_dir(argv[1]);
|
||||
const sfs::path upload_dir(argv[1]);
|
||||
|
||||
std::string url;
|
||||
if (argc == 3) {
|
||||
@@ -31,9 +32,7 @@ int main(int argc, char* argv[]) {
|
||||
url = "http://httpbin.org/post";
|
||||
}
|
||||
|
||||
namespace bfs = boost::filesystem;
|
||||
|
||||
if (!bfs::is_directory(upload_dir) || !bfs::exists(upload_dir)) {
|
||||
if (!sfs::is_directory(upload_dir) || !sfs::exists(upload_dir)) {
|
||||
std::cerr << "Invalid upload dir!" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user