MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / get_manifest_path

Function get_manifest_path

subprojects/llama.cpp/common/download.cpp:61–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61static std::string get_manifest_path(const std::string & repo, const std::string & tag) {
62 // we use "=" to avoid clashing with other component, while still being allowed on windows
63 std::string fname = "manifest=" + repo + "=" + tag + ".json";
64 if (!validate_repo_name(repo)) {
65 throw std::runtime_error("error: repo name must be in the format 'owner/repo'");
66 }
67 string_replace_all(fname, "/", "=");
68 return fs_get_cache_file(fname);
69}
70
71static std::string read_file(const std::string & fname) {
72 std::ifstream file(fname);

Callers 1

common_get_hf_fileFunction · 0.85

Calls 3

validate_repo_nameFunction · 0.85
fs_get_cache_fileFunction · 0.85
string_replace_allFunction · 0.70

Tested by

no test coverage detected