| 288 | } |
| 289 | |
| 290 | std::vector<std::pair<bool, std::filesystem::path>> Storage::GetStaticFiles() |
| 291 | { |
| 292 | constexpr bool IS_REQUIRED = true; |
| 293 | constexpr bool IS_OPTIONAL = false; |
| 294 | |
| 295 | std::vector<std::pair<bool, std::filesystem::path>> files = { |
| 296 | {IS_OPTIONAL, config.GetPath(".osrm.cells")}, |
| 297 | {IS_OPTIONAL, config.GetPath(".osrm.partition")}, |
| 298 | {IS_REQUIRED, config.GetPath(".osrm.ebg_nodes")}, |
| 299 | {IS_REQUIRED, config.GetPath(".osrm.maneuver_overrides")}, |
| 300 | {IS_REQUIRED, config.GetPath(".osrm.nbg_nodes")}, |
| 301 | {IS_REQUIRED, config.GetPath(".osrm.ramIndex")}, |
| 302 | {IS_REQUIRED, config.GetPath(".osrm.properties")}, |
| 303 | {IS_REQUIRED, config.GetPath(".osrm.timestamp")}}; |
| 304 | |
| 305 | for (const auto &file : {".osrm.edges", ".osrm.names", ".osrm.icd", ".osrm.tls", ".osrm.tld"}) |
| 306 | { |
| 307 | if (config.IsRequiredConfiguredInput(file)) |
| 308 | { |
| 309 | files.push_back({IS_REQUIRED, config.GetPath(file)}); |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | for (const auto &file : files) |
| 314 | { |
| 315 | if (file.first == IS_REQUIRED && !std::filesystem::exists(file.second)) |
| 316 | { |
| 317 | throw util::exception("Could not find required file(s): " + std::get<1>(file).string()); |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | return files; |
| 322 | } |
| 323 | |
| 324 | std::vector<std::pair<bool, std::filesystem::path>> Storage::GetUpdatableFiles() |
| 325 | { |
no test coverage detected