MCPcopy Create free account
hub / github.com/WheretIB/nullc / FileSize

Function FileSize

NULLC/includes/file.cpp:180–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178 return ftell(file->handle);
179 }
180 long long FileSize(File* file)
181 {
182 if(!file->handle)
183 {
184 nullcThrowError("Cannot get size of a closed file.");
185 return 0;
186 }
187 long pos = ftell(file->handle);
188 fseek(file->handle, SEEK_END, 0);
189 long res = ftell(file->handle);
190 fseek(file->handle, SEEK_SET, pos);
191 return res;
192 }
193 void FileReadArr(NULLCArray arr, unsigned offset, unsigned count, File* file)
194 {
195 if(!file->handle)

Callers

nothing calls this directly

Calls 1

nullcThrowErrorFunction · 0.50

Tested by

no test coverage detected