Is there a quick way to get the file size of a file from an initialized file handle (FILE *)

12-30-2001

Salem

fseek( fp, 0, SEEK_END);
length = ftell( fp );

01-02-2002

duck-billed platypus

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?

01-03-2002

Salem

There are quicker ways, but they dont involve a FILE*, and they are OS specific.