Class Config

java.lang.Object
org.aesh.terminal.utils.Config

public class Config extends Object
Configuration utility class providing system and environment information such as OS type, line separators, and path separators.
Author:
Ståle W. Pedersen
  • Field Details

    • CR

      public static final int[] CR
      The line separator as an array of code points.
  • Method Details

    • isOSPOSIXCompatible

      public static boolean isOSPOSIXCompatible()
      Check if the operating system is POSIX compatible.
      Returns:
      true if the OS is POSIX compatible, false otherwise
    • isCygwin

      public static boolean isCygwin()
      Check if the environment is running under Cygwin.
      Returns:
      true if running under Cygwin, false otherwise
    • isMacOS

      public static boolean isMacOS()
      Check if the operating system is macOS.
      Returns:
      true if the OS is macOS, false otherwise
    • isWindows

      public static boolean isWindows()
      Check if the operating system is Windows.
      Returns:
      true if the OS is Windows, false otherwise
    • getLineSeparator

      public static String getLineSeparator()
      Get the system line separator.
      Returns:
      the line separator string for the current platform
    • getPathSeparator

      public static String getPathSeparator()
      Get the system path separator.
      Returns:
      the file path separator string for the current platform
    • getTmpDir

      public static String getTmpDir()
      Get the system temporary directory.
      Returns:
      the path to the system temporary directory
    • getHomeDir

      public static String getHomeDir()
      Get the user's home directory.
      Returns:
      the path to the user's home directory
    • getUserDir

      public static String getUserDir()
      Get the current user directory (working directory).
      Returns:
      the path to the current user directory