meeeeerge

This commit is contained in:
Jonas Zeunert
2019-08-22 21:57:55 +02:00
2 changed files with 18 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#include <fstream>
#include <algorithm>
#include <numeric>
#include <experimental/filesystem>
int main(int argc, char** argv)
{
@@ -36,6 +37,8 @@ using namespace Poco::Util;
using namespace Poco::JSON;
using namespace Poco;
namespace fs = std::experimental::filesystem;
FlippRServer::FlippRServer() :
help_requested(false),
input_port(9980),
@@ -197,6 +200,19 @@ TCPServer* FlippRServer::build_input_server()
return new TCPServer(new input::InputSocketHandlerFactory(this->input_driver), port);
}
std::string FlippRServer::create_directory(std::string file_name)
{
std::string runtime_dir = this->get_runtime_dir();
fs::path path = runtime_dir + file_name;
if(!fs::exists(path))
{
fs::create_directory(path);
}
return path;
}
void FlippRServer::defineOptions(OptionSet& options)
{
ServerApplication::defineOptions(options);