| 932 | } |
| 933 | |
| 934 | std::string fs_get_cache_file(const std::string & filename) { |
| 935 | GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos); |
| 936 | std::string cache_directory = fs_get_cache_directory(); |
| 937 | const bool success = fs_create_directory_with_parents(cache_directory); |
| 938 | if (!success) { |
| 939 | throw std::runtime_error("failed to create cache directory: " + cache_directory); |
| 940 | } |
| 941 | return cache_directory + filename; |
| 942 | } |
| 943 | |
| 944 | std::vector<common_file_info> fs_list(const std::string & path, bool include_directories) { |
| 945 | std::vector<common_file_info> files; |
no test coverage detected