/** * Attempts to show a File using the native operating * system file view, for example the Finder on a Mac, * or Explorer on Windows. This may not work on all * platforms. * @param file The file to be shown */ public static void showFile(File file) throws IOException { if (System.getProperty("os.name").contains("Mac")) { showInFinder(file); } else if (System.getProperty("os.name").contains("Windows")) { showInExplorer(file); } else { logger.debug("showFile not implemented for " + System.getProperty("os.name")); } }
/** * Attempts to show a File using the native operating * system file view, for example the Finder on a Mac, * or Explorer on Windows. This may not work on all * platforms. * @param file The file to be shown */ public static void showFile(File file) throws IOException { if (System.getProperty("os.name").indexOf("Mac") != -1) { showInFinder(file); } else if (System.getProperty("os.name").indexOf("Windows") != -1) { showInExplorer(file); } else { logger.debug("showFile not implemented for " + System.getProperty("os.name")); } }
/** * Attempts to show a File using the native operating * system file view, for example the Finder on a Mac, * or Explorer on Windows. This may not work on all * platforms. * @param file The file to be shown */ public static void showFile(File file) throws IOException { if (System.getProperty("os.name").indexOf("Mac") != -1) { showInFinder(file); } else if (System.getProperty("os.name").indexOf("Windows") != -1) { showInExplorer(file); } else { logger.debug("showFile not implemented for " + System.getProperty("os.name")); } }