Addressed comments
This commit is contained in:
committed by
Daniel J. H
parent
d9e8caf369
commit
0b5c7a97a7
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user