import java.io.*;
import javax.swing.filechooser.*;
public class DriveTypeInfo {
public static void main(String[] args)
{
FileSystemView fsv = FileSystemView.getFileSystemView();
System.out.println("Home directory: " + fsv.getHomeDirectory());
File[] f = File.listRoots();
for (File aF : f) {
System.out.println("Drive: " + aF);
System.out.println("Display name: " + fsv.getSystemDisplayName(aF));
}
}
}
No comments:
Post a Comment