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

Method get_basedir

llama.cpp:862–872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860 }
861
862 std::string get_basedir() const {
863 const char * model_path = fname.c_str();
864#if defined(_WIN32)
865 size_t found = fname.find_last_of("/\\");
866 return fname.substr(0, found);
867#else
868 #include <libgen.h>
869 const char * base_dir = dirname(const_cast<char *>(model_path));
870 return std::string(base_dir);
871#endif
872 }
873
874 size_t tell() const {
875#ifdef _WIN32

Callers 1

llama.cppFile · 0.80

Calls 3

substrMethod · 0.80
stringFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected