in reply to Re: Re: filesize module on win32 systems
in thread filesize module on win32 systems

Perl calls the C runtime fstat() to get the information. I the case of MSVC the actual call is _fstati64() which in turn calls GetFileInformationByHandle(). That returns a structure called BY_HANDLE_FILE_INFORMATION, which contains to DWORDS fields that contain the filesize. The filesize as it would be if you read the whole think into memory. Ie. decompressed, de-sparsed etc.

To get the actual on-disk size you would need to call GetCompressedFileSize().


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail