| 984 | } |
| 985 | |
| 986 | std::string fs_get_cache_file(const std::string & filename) { |
| 987 | GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos); |
| 988 | std::string cache_directory = fs_get_cache_directory(); |
| 989 | const bool success = fs_create_directory_with_parents(cache_directory); |
| 990 | if (!success) { |
| 991 | throw std::runtime_error("failed to create cache directory: " + cache_directory); |
| 992 | } |
| 993 | return cache_directory + filename; |
| 994 | } |
| 995 | |
| 996 | std::vector<common_file_info> fs_list(const std::string & path, bool include_directories) { |
| 997 | std::vector<common_file_info> files; |
no test coverage detected