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

Function file_is_empty

smallthinker/tools/main/main.cpp:58–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58static bool file_is_empty(const std::string & path) {
59 std::ifstream f;
60 f.exceptions(std::ifstream::failbit | std::ifstream::badbit);
61 f.open(path.c_str(), std::ios::in | std::ios::binary | std::ios::ate);
62 return f.tellg() == 0;
63}
64
65#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32)
66static void sigint_handler(int signo) {

Callers 1

mainFunction · 0.85

Calls 2

openMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected