| 326 | string LastAbsPathLoaded() { return last_abs_path_loaded; } |
| 327 | |
| 328 | int64_t LoadFileFromAny(string_view filename, string *dest, int64_t start, int64_t len) { |
| 329 | if (IsAbsolute(filename)) { |
| 330 | // Absolute filename. |
| 331 | return cur_loader(last_abs_path_loaded = string(filename), dest, start, len); |
| 332 | } |
| 333 | for (auto &dir : data_dirs) { |
| 334 | auto l = cur_loader(last_abs_path_loaded = dir + filename, dest, start, len); |
| 335 | if (l >= 0) return l; |
| 336 | } |
| 337 | LOG_DEBUG("LoadFileFromAny: ", filename, " file not found"); |
| 338 | return -1; |
| 339 | } |
| 340 | |
| 341 | // We don't generally load in ways that allow stdio text mode conversions, so this function |
| 342 | // emulates them at best effort. |
no test coverage detected