Class OSUtils

java.lang.Object
org.jline.utils.OSUtils

public class OSUtils extends Object
Utility class for operating system detection and OS-specific operations.

The OSUtils class provides constants and methods for detecting the current operating system and performing OS-specific operations. It helps JLine components adapt their behavior based on the platform they're running on, which is particularly important for terminal handling where different operating systems have different terminal implementations and capabilities.

This class includes constants for detecting common operating systems:

  • Windows - Including detection of Cygwin and MSYS environments
  • Linux
  • macOS (OSX)
  • AIX
  • Other Unix-like systems

It also provides utility methods for working with file paths, environment variables, and other OS-specific features that affect terminal behavior.

This class is used throughout JLine to ensure correct behavior across different platforms, particularly for terminal detection, path handling, and native library loading.