List of usage examples for java.nio.file FileStore toString
public String toString()
From source file:Main.java
public static void printDetails(FileStore store) { try {/* ww w . j a va 2 s.c o m*/ String desc = store.toString(); String type = store.type(); long totalSpace = store.getTotalSpace(); long unallocatedSpace = store.getUnallocatedSpace(); long availableSpace = store.getUsableSpace(); System.out.println(desc + ", Total: " + totalSpace + ", Unallocated: " + unallocatedSpace + ", Available: " + availableSpace); } catch (IOException e) { e.printStackTrace(); } }