From: Daniel Berger Date: 2005-09-07T12:56:28+09:00 Subject: Re: Help me clean up this method Ara.T.Howard wrote: > On Tue, 6 Sep 2005, Daniel Berger wrote: > > > Ara.T.Howard wrote: > > > > > > > >> just thought i'd point out that every solution posted thus far fails in a > >> variety of ways when links are considered - in the best cases linked files > >> are counted twice or linked dirs are not checked, in the worst case > >> infinite loops occur. > > > > For a good summary of the problems with calculating the size of a directory > > (on Windows) see > > http://blogs.msdn.com/oldnewthing/archive/2004/12/28/336219.aspx. > > indeed. > > we've got a script here (dirsum) that does essentially all the things outlined > - especially checking compressed files - for monitoring data volumes. the > problem is much trickier that one would assume. By all means, please share. I'd be happy to add a Dir.size method to win32-dir. :) Regards, Dan