MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / stat

Class stat

src/helper.cpp:498–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496// https://stackoverflow.com/questions/5840148/how-can-i-get-a-files-size-in-c
497long Helper::getFileSize(std::string filename) {
498 struct stat stat_buf;
499 int rc = stat(filename.c_str(), &stat_buf);
500 return rc == 0 ? stat_buf.st_size : -1;
501}

Callers 1

getFileSizeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected