| 347 | } |
| 348 | |
| 349 | std::string Storage::PopulateLayoutWithRTree(storage::BaseDataLayout &layout) |
| 350 | { |
| 351 | // Figure out the path to the rtree file (it's not a tar file) |
| 352 | auto absolute_file_index_path = std::filesystem::absolute(config.GetPath(".osrm.fileIndex")); |
| 353 | |
| 354 | // Convert the std::filesystem::path object into a plain string |
| 355 | // that can then be stored as a member of an allocator object |
| 356 | auto rtree_filename = absolute_file_index_path.string(); |
| 357 | |
| 358 | // Here, we hardcode the special file_index_path block name. |
| 359 | // The important bit here is that the "offset" is set to zero |
| 360 | layout.SetBlock("/common/rtree/file_index_path", make_block<char>(rtree_filename.length() + 1)); |
| 361 | |
| 362 | return rtree_filename; |
| 363 | } |
| 364 | |
| 365 | /** |
| 366 | * This function examines all our data files and figures out how much |
no test coverage detected