Anders Riggelsen

Disk Usage Analyzer .NET

Disk Usage Analyzer GUI

This is a tiny application I made to create a graphical chart over the space-usage of your harddrive and folders. It is heavily inspired by the Disk Usage Analyzer tool (aka. 'Baobab') that comes with Ubuntu.

Now I made that functionality available for all platforms that can run .NET applications. I haven't tested it on a Mac (since I don't have one), but it works good on Linux except for a few GUI issues.

The interface should be pretty self-explanatory except for a few things:

Requires the .NET 3.5 runtime.

Download Disk Usage Analyzer (118 kb .exe)

Download source code (83 kb .zip)

How it works (technically)

It works by recursively traverse the folder structure and accumulate the file sizes. Every folder is stored in a tree for displaying later.

When Disk Usage Analyzer .NET needs to draw the graph, it first analyzes the data collected when the folders were traversed. Each folder then gets associated a percentage of how much of their parent they take. This is then finally used when the graph is drawn.
I draw the chart by depth-first traversing the inernal folder structure again, but now drawing a circle-slice based on the calculated percentages from the outside-in. There are probably more efficient ways to do this, but I haven't seen it become slow - even on very large and complex graphs.