filesize in GNU c

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • byenary
    New Member
    • Sep 2007
    • 3

    filesize in GNU c

    Hello,

    can sombody explain me how do get a filesize using gnu C.
    getfilesize() does not seem to be present...

    Grts
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    opern the file in binary mode using fopen
    goto the end of the file using fseek
    get the location of the file pointer (which is at the end of the file so this will be the file size) using ftell
    close the file using fclose

    Comment

    Working...