// if the disk is really filled up we can't even create a single file,
// so calling File.createTempFile and figuring out the directory won't reliably work.
f = new File(System.getProperty("java.io.tmpdir"));
long s = f.getUsableSpace();
if(s<=0) return null;
return new DiskSpace(f.getCanonicalPath(), s);
} catch (LinkageError e) {
// pre-mustang
return null;
}
}