MCPcopy Create free account
hub / github.com/alibaba/MNN / checkFile

Method checkFile

transformers/llm/engine/src/llm.cpp:271–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271bool Llm::checkFile(const std::string& path, const char* name) {
272 if (!MNNFileExist(path.c_str())) {
273 MNN_ERROR("[Error]: %s not found: %s\n", name, path.c_str());
274 return false;
275 }
276 std::ifstream f(path);
277 if (!f.is_open()) {
278 MNN_ERROR("[Error]: Failed to open %s (permission denied?): %s\n", name, path.c_str());
279 return false;
280 }
281 return true;
282}
283
284bool Llm::load() {
285 // check required files before loading

Callers

nothing calls this directly

Calls 3

MNNFileExistFunction · 0.85
c_strMethod · 0.45
is_openMethod · 0.45

Tested by

no test coverage detected