List of usage examples for javax.swing.filechooser FileSystemView getSystemTypeDescription
public String getSystemTypeDescription(File f)
From source file:org.dbgl.util.FileUtils.java
public static boolean isStoredOnCDRomDrive(File file) { if (PlatformUtils.IS_OSX) return false; // FileSystemView doesn't work on OSX and leads to freeze on application exit FileSystemView fsv = FileSystemView.getFileSystemView(); for (File f : File.listRoots()) { if (areRelated(f, file)) { return fsv.isDrive(f) && fsv.getSystemTypeDescription(f).toUpperCase().contains("CD"); }// w w w . ja va 2s . c om } return false; }