/*******************************************************************************
*
* Copyright (c) 2010, Oracle Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*
* Geoff Waymark
*
*
*******************************************************************************/
package org.eclipse.hudson.test.ui.util;
/**
* Utility Class to work out which platform the Master is running on.
* <p/>
* Copyright (C) 2011 Hudson-CI.org
* <p/>
* Date: 5/17/11
*
* @author Geoff Waymark
*/
public class SystemUtils {
public static boolean isWindows() {
String os = System.getProperty("os.name").toLowerCase();
//Windows
return (os.indexOf("win") >= 0);
}
public static boolean isMac() {
String os = System.getProperty("os.name").toLowerCase();
//Mac
return (os.indexOf("mac") >= 0);
}
public static boolean isUnix() {
String os = System.getProperty("os.name").toLowerCase();
//linux or unix
return (os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0);
}
}