blob: 74ca35c6c0b23c49e284757dd865897ec66dc3bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package net.arikia.dev.drpc;
/**
* @author DeJay
* @version 1.6.1
* <p>
* Class containing utils for detecting the user's OS.
*/
public final class OSUtil {
public boolean isMac() {
return getOS().toLowerCase()
.startsWith("mac");
}
public boolean isWindows() {
return getOS().toLowerCase()
.startsWith("win");
}
public String getOS() {
return System.getProperty("os.name").toLowerCase();
}
}
|