forked from fanruan/finekit
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.
31 lines
659 B
31 lines
659 B
6 years ago
|
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;
|
||
|
}
|
||
|
|
||
|
}
|