Class OsUtils

java.lang.Object
nz.org.riskscape.engine.OsUtils

public class OsUtils extends Object

Various utilities for interacting with the OS

  • Field Details

    • LINE_SEPARATOR

      public static final String 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

      public static String fixPathSep(String path)

      for strings that have file separators in them, make them correct for the env.

      Parameters:
      path -
      Returns:
      String
    • fps

      public static String fps(String path)
    • 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

      public static String getOS()