MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / llama_file

Method llama_file

llama.cpp:852–860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

850 size_t size;
851
852 llama_file(const char * fname, const char * mode): fname(fname) {
853 fp = std::fopen(fname, mode);
854 if (fp == NULL) {
855 throw std::runtime_error(format("failed to open %s: %s", fname, strerror(errno)));
856 }
857 seek(0, SEEK_END);
858 size = tell();
859 seek(0, SEEK_SET);
860 }
861
862 std::string get_basedir() const {
863 const char * model_path = fname.c_str();

Callers

nothing calls this directly

Calls 1

formatFunction · 0.70

Tested by

no test coverage detected