Package arc.util

Class OS

java.lang.Object
arc.util.OS

public class OS extends Object
  • Field Details

    • cores

      public static final int cores
    • username

      public static final String username
      User's account name.
    • userHome

      public static final String userHome
      User's home directory.
    • osName

      public static final String osName
      Name of the OS being used.
    • osVersion

      public static final String osVersion
      Version of the OS being used; format varies based on OS.
    • osArch

      public static final String osArch
      Operating system architecture, e.g. "amd64"
    • osArchBits

      public static final String osArchBits
      Either 32 or 64.
    • javaVersion

      public static final String javaVersion
      JVM version; may contain underscores. Examples: 1.8.0_211 (Java 8 update 211), 12.0.1 (Java 12)
    • isWindows

      public static boolean isWindows
    • isLinux

      public static boolean isLinux
    • isMac

      public static boolean isMac
    • isIos

      public static boolean isIos
    • isAndroid

      public static boolean isAndroid
    • isARM

      public static boolean isARM
    • is64Bit

      public static boolean is64Bit
  • Constructor Details

    • OS

      public OS()
  • Method Details

    • getAppDataDirectoryString

      public static String getAppDataDirectoryString(String appname)
    • getWindowsTmpDir

      public static String getWindowsTmpDir()
    • exec

      public static String exec(boolean logErr, String... args)
      Executes, returns the result output string with the err output optionally tacked on.
    • exec

      public static String exec(String... args)
      Executes a process. Does not include the error output stream.
    • execSafe

      public static boolean execSafe(String command)
    • execSafe

      public static boolean execSafe(String... command)
    • getAppDataDirectory

      public static Fi getAppDataDirectory(String appname)
    • hasProp

      public static boolean hasProp(String name)
    • prop

      public static String prop(String name)
    • hasEnv

      public static boolean hasEnv(String name)
    • env

      public static String env(String name)
    • propNoNull

      public static String propNoNull(String name)