You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.fanruan.api.macro;
|
|
|
|
|
|
|
|
import com.fr.stable.os.AbstractOperatingSystem;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 操作系统判断类,判断操作系统种类
|
|
|
|
* @author Kalven
|
|
|
|
* @version 10.0
|
|
|
|
* Created by Kalven on 2019/8/31
|
|
|
|
*/
|
|
|
|
public class OperatingSystem {
|
|
|
|
|
|
|
|
private static final AbstractOperatingSystem myOS = com.fr.stable.os.OperatingSystem.getOperatingSystem();
|
|
|
|
|
|
|
|
private OperatingSystem() {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static boolean isWindows() {
|
|
|
|
return myOS.getType() == com.fr.stable.os.OperatingSystem.WINDOWS;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static boolean isUnix() {
|
|
|
|
return myOS.isUnix();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static boolean isMacOS() {
|
|
|
|
return myOS.getType() == com.fr.stable.os.OperatingSystem.MACOS;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|