Package nz.org.riskscape.engine
Class OsUtils
java.lang.Object
nz.org.riskscape.engine.OsUtils
Various utilities for interacting with the OS
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Checks the current console for any compatibility problems that might cause the user headaches when running RiskScape.static String
fixPathSep
(String path) for strings that have file separators in them, make them correct for the env.static String
static String
getOS()
static boolean
isLinux()
static boolean
isMac()
static boolean
-
Field Details
-
LINE_SEPARATOR
-
-
Constructor Details
-
OsUtils
public OsUtils()
-
-
Method Details
-
isLinux
public static boolean isLinux()- Returns:
- true if it looks like the system's os name is a Linux variant. Note that other Unix variants (like AIX) are also included here, but Mac OS is not (even though Mac is technically a Unix system).
-
isMac
public static boolean isMac()- Returns:
- true if it looks like the system's os name is a Mac OS variant
-
isWindows
public static boolean isWindows()- Returns:
- true if it looks like the system's os name is a windows variant
-
fixPathSep
for strings that have file separators in them, make them correct for the env.
- Parameters:
path
-- Returns:
- String
-
fps
-
checkConsoleCompatibility
public static void checkConsoleCompatibility()Checks the current console for any compatibility problems that might cause the user headaches when running RiskScape. In particular, the default terminal encoding on Windows can result in some truly awful display issues.
-
getOS
-