| 322 | } |
| 323 | |
| 324 | std::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 | |
| 349 | std::string Storage::PopulateLayoutWithRTree(storage::BaseDataLayout &layout) |
| 350 | { |
no test coverage detected