in reply to Re: Those unreliable file stat operations in Win32
in thread Those unreliable file stat operations in Win32
I see you have a solution, so this is probably irrelevant, but I did discover an interesting possibility whilst playing with this. It would only work if the volume receiving the output file has the compressed atribute enabled.
There is another API, GetCompressedFileSize(), which returns the actual storage requiements rather than the logical size, for compressed or sparse files. I just tried this to see what values I get from it whilst copying a 1 GB logical/500k actual file on a compressed volume and discovered that it reports the full filesize (1GB) immediately after the destination file is opened and then the reported size slowly decreases over time until the file is closed at which point it returns the final compressed size.
Whether this is any easier than just trying to open the file I doubt, but I found it interesting anyway.
|
|---|