MCPcopy Create free account
hub / github.com/brichard19/BitCrack / getFileSize

Function getFileSize

util/util.cpp:155–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153 }
154
155 long getFileSize(const std::string &fileName)
156 {
157 FILE *fp = fopen(fileName.c_str(), "rb");
158 if(fp == NULL) {
159 return -1;
160 }
161
162 fseek(fp, 0, SEEK_END);
163
164 long pos = ftell(fp);
165
166 fclose(fp);
167
168 return pos;
169 }
170
171 bool readLinesFromStream(const std::string &fileName, std::vector<std::string> &lines)
172 {

Callers 1

appendToFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected