avogelba / WinDirStats

WinDirStats - Windows Directory Statistics, private clone from:
https://bitbucket.org/windirstat/windirstat
GNU General Public License v2.0
5 stars 0 forks source link

Show on-disk and logical file sizes separately #68

Open avogelba opened 10 years ago

avogelba commented 10 years ago

Originally reported by: Oliver (Bitbucket: assarbad, GitHub: assarbad)


This matters for sparse files and such as well as hardlinked files. Only need to find a reasonably fast solution to the problem.


avogelba commented 9 years ago

Original comment by Doug McClean (Bitbucket: doughless, GitHub: doughless):


Would an option to toggle between logical and on-disk size be a decent solution? I unfortunately had a difficult time finding sparse files (using up 20 GB each) that were eating up my disk space.

avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


Thanks, however this issue isn't about how to do it, but to do it at the same time. I.e. show both pieces of data instead of merely one size.

And no, for hardlinks the method you suggest is horrible. Have you tried it youself? The problem is not to know whether file has multiple links to it (that's trivial). The problem is which belong together and do that runtime efficient. But again, that's outside the scope of this ticket :)

avogelba commented 10 years ago

Original comment by Roman Starkov (Bitbucket: rstarkov, GitHub: rstarkov):


GetCompressedFileSize appears to be the way to do this. Is it slow? It shouldn't be.

Files with multiple hardlinks need to be handled separately, using GetFileInformationByHandle and possibly also FindFirstFileName.