Utility Classes
This section contains little Java Utility classes - those little classes that you find yourself looking futilely for through long listings of java.util.* documentation. We've all been there.....
DirSizer
DirSizer is a small java class that gives you amount of space taken up beneath a directory. That is the sum of all the file sizes in the directory, and the directories below it, and the directories below it, and so on.For the Unix crowd, its "du -s" for Java. (In fact, this has been pulled from an unfinished utility called JDU). For the Windows crowd, its like right-clicking on a directory and getting the properties.
You can find JAR file containing a single DirSizer class (plus accompanying source) here:
And you can find the accompanying javadoc here!Whilst this code is Copyright 2005 Asman IT Consulting, permission is hereby granted to use the DirSizer class freely.
And, in true software developer style, there are no warranties with this code, express or implied. If you do have any feedback, good or bad, we'd like to hear about it though - feel free to contact us through the "Contact" Us" link.