is it possible to collect information about the disk usage.
for example: total space for local c:\, total used and total free.
can i do this in pure java?Thanks for any replies.
Joe Ess wrote:Or you could use the methods of java.io.File like getFreeSpace() and getTotalSpace().
+1. These got added in Java 6. Note that they are not static methods, because the values (may) differ for each root. Simply create a new file for C:\:
You can also use File.listRoots() to list all roots, then call these methods on those.