Hi - does anyone know if there's a way to very quickly get the size of a directory? I am writing a Windows's-like filechooser popup that lists the sizes of files and directories. For directories, I am using a recursive function that adds up the sizes of the files and subdirectories. But sometimes this doesn't work fast enough, and my program starts to hang. I'm hoping there's some obscure Java extension call that I don't know about. Or is there some Windows shell function I can call directly though to? Thanks.
There is no quick way to get the size (disk usage) of whole directory with all subdirectories. It is needed to read all subdirectories (recursively) from disk (at least those which are not in cache) which is slow for bigger directory tree.
Using an OS function may seed id up, but the disk accesses are still required. [ December 20, 2005: Message edited by: Vlado Zajac ]
catch it before it slithers away! Oh wait, it's a tiny ad: