Addressed comments

This commit is contained in:
Pepijn Schoen
2017-06-28 17:53:54 +02:00
committed by Daniel J. H
parent d9e8caf369
commit 0b5c7a97a7
10 changed files with 54 additions and 69 deletions
+28
View File
@@ -0,0 +1,28 @@
#include "storage/io_config.hpp"
#include "util/log.hpp"
#include <boost/filesystem.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
namespace osrm
{
namespace storage
{
bool IOConfig::IsValid() const
{
bool success = true;
for (auto &fileName : required_input_files)
{
if (!boost::filesystem::is_regular_file({base_path.string() + fileName.string()}))
{
util::Log(logWARNING) << "Missing/Broken File: " << base_path.string()
<< fileName.string();
success = false;
}
}
return success;
}
}
}
-27
View File
@@ -1,27 +0,0 @@
#include "storage/storage_config.hpp"
#include "util/log.hpp"
#include <boost/filesystem/operations.hpp>
namespace osrm
{
namespace storage
{
namespace
{
bool CheckFileList(const std::vector<boost::filesystem::path> &files)
{
bool success = true;
for (auto &path : files)
{
if (!boost::filesystem::exists(path))
{
util::Log(logERROR) << "Missing File: " << path.string();
success = false;
}
}
return success;
}
}
}
}