MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getFileLen

Function getFileLen

plugins/plugin_utils/plugin_files.cpp:395–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393}
394
395unsigned int getFileLen(const char* file) {
396 if (!file) {
397 return 0;
398 }
399
400 FILE* fp = fopen(convertPathToDelims(file).c_str(), "rb");
401 if (!fp) {
402 return 0;
403 }
404
405 fseek(fp, 0, SEEK_END);
406 unsigned int i = (unsigned int)ftell(fp);
407 fclose(fp);
408
409 return i;
410}
411
412bool fileExists(const char* path) {
413 if (!path) {

Callers

nothing calls this directly

Calls 2

convertPathToDelimsFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected