Package ca.phon.util
Class OSInfo
java.lang.Object
ca.phon.util.OSInfo
Utility class for determining host OS.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic OSInfo.OSType
Get the host os type.static boolean
isMacOs()
Is the host os Mac OS?static boolean
isNix()
Is the host os *nix?static boolean
Is the host os windows?
-
Field Details
-
OS_TYPE
Field containing the host OS type
-
-
Constructor Details
-
OSInfo
public OSInfo()
-
-
Method Details
-
getOSType
Get the host os type.- Returns:
- the host os type, or
OSType.OTHER
is not detected
-
isMacOs
public static boolean isMacOs()Is the host os Mac OS?- Returns:
true
if system property 'mrj.version' is setfalse
otherwise.
-
isWindows
public static boolean isWindows()Is the host os windows?- Returns:
true
if system property 'os.name' contains the string 'windows',false
otherwise
-
isNix
public static boolean isNix()Is the host os *nix?- Returns:
true
if system property 'os.name' contains the string 'nix' or 'nux',false
otherwise
-