| 871 | } |
| 872 | |
| 873 | std::string fs_get_cache_file(const std::string & filename) { |
| 874 | GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos); |
| 875 | std::string cache_directory = fs_get_cache_directory(); |
| 876 | const bool success = fs_create_directory_with_parents(cache_directory); |
| 877 | if (!success) { |
| 878 | throw std::runtime_error("failed to create cache directory: " + cache_directory); |
| 879 | } |
| 880 | return cache_directory + filename; |
| 881 | } |
| 882 | |
| 883 | |
| 884 | // |
no test coverage detected