String dir = System.getProperty("user.home");
assertTrueTrace("\nMountPoint for " + dir,
mounts.getMountPoint(dir).getDirName());
for (int i=0; i<fslist.length; i++) {
FileSystem fs = fslist[i];
assertTrue(mounts.getFileSystem(fs.getDirName()) != null);
assertLengthTrace("DevName", fs.getDevName());
assertLengthTrace("DirName", fs.getDirName());
assertLengthTrace("TypeName", fs.getTypeName());
assertLengthTrace("SysTypeName", fs.getSysTypeName());
FileSystemUsage usage;
try {
usage = sigar.getFileSystemUsage(fs.getDirName());
} catch (SigarException e) {
if (fs.getType() == FileSystem.TYPE_LOCAL_DISK) {
throw e;
}
//else ok, e.g. floppy drive on windows
continue;
}
switch (fs.getType()) {
case FileSystem.TYPE_LOCAL_DISK:
assertGtZeroTrace(" Total", usage.getTotal());
//possible machines have full filesystems
assertGtEqZeroTrace(" Free", usage.getFree());
assertGtEqZeroTrace(" Avail", usage.getAvail());