public final class OS
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
IS_LINUX
True if OS is Linux
|
static boolean |
IS_OSX
True if OS is OSX
|
static boolean |
IS_UNIX
True if OS is Unix (Unix || AIX || Linux || OSX)
|
static boolean |
IS_WINDOWS
True if OS is windows
|
static java.lang.String |
LN
Line Separator string.
|
static java.lang.String |
OS_NAME
The name of the OS
|
Modifier | Constructor and Description |
---|---|
private |
OS() |
Modifier and Type | Method and Description |
---|---|
private static boolean |
isOSName(java.lang.String name)
Simple test for OS Name
|
static java.lang.String |
separators(java.lang.String path)
Convert path separators to the System path separators.
|
public static final java.lang.String OS_NAME
public static final boolean IS_WINDOWS
public static final boolean IS_OSX
public static final boolean IS_LINUX
public static final boolean IS_UNIX
public static final java.lang.String LN
Note: For Java 1.7 or newer, use System.lineSeparator()
public static java.lang.String separators(java.lang.String path)
This helps ensure that the paths provided in the unit tests work equally as well on unix / osx / windows.
path
- the raw path to convertprivate static boolean isOSName(java.lang.String name)
name
- the name to look for