Is there a quick way to get the file size of a file from an initialized file handle (FILE *)
Is there a quick way to get the file size of a file from an initialized file handle (FILE *)
fseek( fp, 0, SEEK_END);
length = ftell( fp );
I thought of that, but it seems to me that there must be a faster way considering when you do one of the various findfile funcitons, the file size is in the struct that is used. Does the OS open the file-seek to the end-close the file just to determine the file size? Would it be quicker just to use findfile and get the size from that?
There are quicker ways, but they dont involve a FILE*, and they are OS specific.