Class OS

java.lang.Object
org.eclipse.jetty.toolchain.test.OS

public final class OS extends Object
Some simple OS specific utilities.
  • Field Details

    • OS_NAME

      public static final String OS_NAME
      The name of the OS
    • IS_WINDOWS

      public static final boolean IS_WINDOWS
      True if OS is windows
    • IS_OSX

      public static final boolean IS_OSX
      True if OS is OSX
    • IS_LINUX

      public static final boolean IS_LINUX
      True if OS is Linux
    • IS_UNIX

      public static final boolean IS_UNIX
      True if OS is Unix (Unix || AIX || Linux || OSX)
    • LN

      public static final String LN
      Line Separator string.

      Note: For Java 1.7 or newer, use System.lineSeparator()

  • Method Details

    • separators

      public static String separators(String path)
      Convert path separators to the System path separators.

      This helps ensure that the paths provided in the unit tests work equally as well on unix / osx / windows.

      Parameters:
      path - the raw path to convert
      Returns:
      the converted path