filesize of large files in c

Posted by endeavormac on Stack Overflow See other posts from Stack Overflow or by endeavormac
Published on 2010-05-10T04:38:50Z Indexed on 2010/05/10 4:48 UTC
Read the original article Hit count: 239

Filed under:
|

How can I get the filesize of a file in C when the filesize is greater than 4gb?

ftell returns a 4 byte signed long, limiting it to two bytes. stat has a variable of type off_t which is also 4 bytes (not sure of sign), so at most it can tell me the size of a 4gb file.

What if the file is larger than 4 gb?

© Stack Overflow or respective owner

Related posts about c

    Related posts about filesize