Reputation: 24937
Is there a canonical way to check the size of a file in Windows? Googling brings me both FindFirstFile and GetFileSizeEx but no clear winner. And must GetLastError always be called too?
Upvotes: 2
Views: 243
Reputation: 490663
If you just want the size, the GetFileSizeEx
is the clear winner. Yes, FindFirstFile
will do the job too, but it's really intended for other purposes, and unless you need to do those other things, its use is likely to mislead or confuse the reader.
Upvotes: 2