| 169 | } |
| 170 | |
| 171 | std::string FioFindDirectory(Subdirectory subdir) |
| 172 | { |
| 173 | /* Find and return the first valid directory */ |
| 174 | for (Searchpath sp : _valid_searchpaths) { |
| 175 | std::string ret = FioGetDirectory(sp, subdir); |
| 176 | if (FileExists(ret)) return ret; |
| 177 | } |
| 178 | |
| 179 | /* Could not find the directory, fall back to a base path */ |
| 180 | return _personal_dir; |
| 181 | } |
| 182 | |
| 183 | static std::optional<FileHandle> FioFOpenFileSp(std::string_view filename, std::string_view mode, Searchpath sp, Subdirectory subdir, size_t *filesize) |
| 184 | { |
no test coverage detected