This post originated from an RSS feed registered with Ruby Buzz
by Daniel Berger.
Original Post: Calculating the size of a directory
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Vincent recently brought up a seemingly simple subject - calculating the size of a directory. I mean, you just recurse into the directory, adding up all the file sizes as you go, right?
Wrong. Especially on Windows.
I'd go over all the problems with this approach, but Raymond Chen has summarized them so well here that I'll just let you read that and let it soak in.