MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / GetUpdatableFiles

Method GetUpdatableFiles

src/storage/storage.cpp:324–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324std::vector<std::pair<bool, std::filesystem::path>> Storage::GetUpdatableFiles()
325{
326 constexpr bool IS_REQUIRED = true;
327 constexpr bool IS_OPTIONAL = false;
328
329 std::vector<std::pair<bool, std::filesystem::path>> files = {
330 {IS_OPTIONAL, config.GetPath(".osrm.mldgr")},
331 {IS_OPTIONAL, config.GetPath(".osrm.cell_metrics")},
332 {IS_OPTIONAL, config.GetPath(".osrm.hsgr")},
333 {IS_REQUIRED, config.GetPath(".osrm.datasource_names")},
334 {IS_REQUIRED, config.GetPath(".osrm.geometry")},
335 {IS_REQUIRED, config.GetPath(".osrm.turn_weight_penalties")},
336 {IS_REQUIRED, config.GetPath(".osrm.turn_duration_penalties")}};
337
338 for (const auto &file : files)
339 {
340 if (file.first == IS_REQUIRED && !std::filesystem::exists(file.second))
341 {
342 throw util::exception("Could not find required file(s): " + std::get<1>(file).string());
343 }
344 }
345
346 return files;
347}
348
349std::string Storage::PopulateLayoutWithRTree(storage::BaseDataLayout &layout)
350{

Callers 2

MMapMemoryAllocatorMethod · 0.80

Calls 2

exceptionClass · 0.85
GetPathMethod · 0.80

Tested by

no test coverage detected