Package org.aesh.terminal.utils
Class Config
java.lang.Object
org.aesh.terminal.utils.Config
Configuration utility class providing system and environment information
such as OS type, line separators, and path separators.
- Author:
- Ståle W. Pedersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int[]The line separator as an array of code points. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet the user's home directory.static StringGet the system line separator.static StringGet the system path separator.static StringGet the system temporary directory.static StringGet the current user directory (working directory).static booleanisCygwin()Check if the environment is running under Cygwin.static booleanisMacOS()Check if the operating system is macOS.static booleanCheck if the operating system is POSIX compatible.static booleanCheck if the operating system is Windows.
-
Field Details
-
CR
public static final int[] CRThe 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
Get the system line separator.- Returns:
- the line separator string for the current platform
-
getPathSeparator
Get the system path separator.- Returns:
- the file path separator string for the current platform
-
getTmpDir
Get the system temporary directory.- Returns:
- the path to the system temporary directory
-
getHomeDir
Get the user's home directory.- Returns:
- the path to the user's home directory
-
getUserDir
Get the current user directory (working directory).- Returns:
- the path to the current user directory
-