public final class OperatingSystemUtils extends Object
| Constructor and Description |
|---|
OperatingSystemUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getLineSeparator()
Return the
String used as line separator for carriage returns. |
static String |
getOsName()
Return the name of the host operating system.
|
static File |
getRedoculousHomeDir() |
static String |
getSafeFilename(String filename)
Generate a string that is usable as a single file name or directory path segment on any operating system.
|
static File |
getUserHomeDir()
Get the logged in user's home directory as a
File. |
static String |
getUserHomePath()
Get the path of the logged in user's home directory.
|
static File |
getUserRedoculousDir()
Get the logged in user's Forge directory.
|
static boolean |
isLinux()
Return
true if the host environment is Linux. |
static boolean |
isOSX()
Return
true if the host environment is OSX. |
static boolean |
isWindows()
Return
true if the host environment is Windows. |
static void |
setPretendWindows(boolean value)
Set this utility to pretend that the current host environment is actually Windows.
|
public static String getOsName()
public static boolean isWindows()
true if the host environment is Windows.public static boolean isOSX()
true if the host environment is OSX.public static boolean isLinux()
true if the host environment is Linux.public static File getRedoculousHomeDir()
public static File getUserHomeDir()
File.public static String getUserHomePath()
public static File getUserRedoculousDir()
public static void setPretendWindows(boolean value)
public static String getLineSeparator()
String used as line separator for carriage returns.Copyright © 2013 OCPsoft. All Rights Reserved.