I\'m running Java on a Unix platform. How can I get a list of all mounted filesystems via the Java 1.6 API?
I\'ve tried File.listRoots() but that return
File.listRoots()
Java doesn't provide any access to mount points. You have to run system command mount via Runtime.exec() and parse its output. Either that, or parse the contents of /etc/mtab.
mount
Runtime.exec()
/etc/mtab