Advertisement

How do I get a file size

Started by March 01, 2001 09:35 PM
1 comment, last by SikCiv 23 years, 11 months ago
I using fopen, fwrite, fclose etc.. and I need to get the file size but I cant find a function to use. Is there a function to do this, something like len = ffilesize(fp)?

  Downloads:  ZeroOne Realm

Here''s how you do it:
  fseek(fp,0,SEEK_END);int size_in_bytes = ftell(fp);  


"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/
Advertisement
Legend, thanks

  Downloads:  ZeroOne Realm

This topic is closed to new replies.

Advertisement