MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / GetSize

Method GetSize

external/capsimage/src/Core/DiskFile.cpp:190–212  ·  view source on GitHub ↗

get the file size

Source from the content-addressed store, hash-verified

188
189// get the file size
190long CDiskFile::GetSize()
191{
192 // default result
193 long res=0;
194
195 // return default result if file is not open
196 if (!dfile)
197 return res;
198
199 // get the current file position, stop on error
200 long pos=ftell(dfile);
201 if (pos < 0)
202 return res;
203
204 // get the file size
205 long size=Seek(0, End);
206
207 // restore file position, stop on error
208 if (Seek(pos, Position) != pos)
209 return res;
210
211 return size;
212}
213
214// get file position
215long CDiskFile::GetPosition()

Callers 15

BeginTableExMethod · 0.45
EndTableMethod · 0.45
GetItemRectSizeMethod · 0.45
BeginMethod · 0.45
EndGroupMethod · 0.45
CloseButtonMethod · 0.45
ScrollbarExMethod · 0.45
TempInputTextMethod · 0.45
InputTextExMethod · 0.45
BeginListBoxMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected