MCPcopy Create free account
hub / github.com/OpenMC2/OpenMC2 / size

Method size

src/FileHandler.cpp:146–156  ·  view source on GitHub ↗

mc2: 0x00617FF0

Source from the content-addressed store, hash-verified

144
145// mc2: 0x00617FF0
146std::int32_t FileHandler::size() {
147 if (file_funcs->get_size != nullptr) {
148 return file_funcs->get_size(handle);
149 } else {
150 if (this->flush() < 0) return -1;
151 std::int32_t curpos = file_funcs->seek(handle, 0, SeekCurrent);
152 std::int32_t size = file_funcs->seek(handle, 0, SeekEnd);
153 file_funcs->seek(handle, curpos, SeekStart);
154 return size;
155 }
156}
157
158FileHandler *sub_617CA0(char *path) {
159 HANDLE file = glo_679814->sub_04(path);

Callers 3

register_file_handleFunction · 0.80
sub_5FD3A0Method · 0.80
unk_5DDA50Method · 0.80

Calls 2

flushMethod · 0.95
seekMethod · 0.80

Tested by

no test coverage detected