类 Platform

java.lang.Object
pkg.exoad.poprock.core.io.Platform

public final class Platform extends Object
Base service class for some very basic information regarding the system
作者:
Jack Meng
  • 构造器详细资料

    • Platform

      private Platform()
  • 方法详细资料

    • getOSVersion

      public static String getOSVersion()
      Get the OS version (os.version)
      返回:
      The OS version
    • isWindowsDesktop

      public static boolean isWindowsDesktop()
      Whether the system is a desktop Windows system. This function does not check if the system is supported or not.
      返回:
      Whether the system is a desktop Windows system
    • getPlatform

      public static PlatformKey getPlatform()
      Get the platform of the system (os.name)
      返回:
      The platform of the system
    • isPlatformSupported

      public static boolean isPlatformSupported()
      Whether the system is supported or not
      返回:
      Whether the system is supported or not
    • isMacos

      public static boolean isMacos()
      Whether the system is a MACOS system
      返回:
      Whether the system is a MACOS system
    • isUnix

      public static boolean isUnix()
      Whether the system is a UNIX based machine
      返回:
      Whether the system is a UNIX based machine
    • isArchSupported

      public static boolean isArchSupported()
      Whether the system's architecture is supported or not
      返回:
      Whether the system's architecture is supported or not
    • getArch

      public static ArchKey getArch()
      Get the architecture of the system (os.arch)
      返回:
      The architecture of the system
    • execCommand

      public static void execCommand(String command) throws IOException
      Executes a command in the system using Runtime.getRuntime().exec()
      参数:
      command - The command to execute
      抛出:
      IOException - If the command cannot be executed
    • __unix_UNAME

      public static String __unix_UNAME()
      UNIX "uname"
      返回:
      The output of "uname"
    • __unix_SETENV

      public static void __unix_SETENV(String key, String value)
      UNIX "export"
      参数:
      key - The key
      value - The value