package org.daisy.pipeline.gui.utils;

public class PlatformUtils {

	public static boolean isMac() {
		return System.getProperty("os.name").toLowerCase().contains("mac"); 
	}
	public static boolean isWin() {
		return System.getProperty("os.name").toLowerCase().contains("win");
	}
	public static boolean isUnix() {
		return System.getProperty("os.name").toLowerCase().contains("nix");
	}
	public static String getFileBrowserCommand() {
		if (isMac()) {
			return "open";
		}
		if (isWin()) {
			return "explorer";
		}
		if (isUnix()) {
			return "xdg-open"; 
		}
		return "";
	}
}

@@ -61,32 +61,34 @@
 Utils %7B%0A
+%09
 %0A%09p
-ublic
+rivate
  static 
 boolean 
@@ -83,34 +83,19 @@
 tic 
-boolean isMac() %7B%0A%09%09return
+String OS =
  Sys
@@ -126,32 +126,79 @@
 %22).toLowerCase()
+;%0A%0A%09public static boolean isMac() %7B%0A%09%09return OS
 .contains(%22mac%22)
@@ -249,51 +249,10 @@
 urn 
+O
 S
-ystem.getProperty(%22os.name%22).toLowerCase()
 .con
@@ -315,51 +315,54 @@
 urn 
-System.getProperty(%22os.name%22).toLowerCase()
+OS.contains(%22nix%22) %7C%7C OS.contains(%22nux%22) %7C%7C OS
 .con
@@ -364,25 +364,25 @@
 S.contains(%22
-n
+a
 ix%22);%0A%09%7D%0A%09pu

check for "nux" in addition to "nix"