com.ansys.ingress.client.api.utils

## Class Platform

- java.lang.Object
- - com.ansys.ingress.client.api.utils.Platform

-     public class Platform
      extends java.lang.Object

  Platform contains methods for interacting with the platform where a client is running.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ANSYS_VERSION`
    `static java.lang.String` | `WHICH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Platform()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `findAppPathLinux(java.lang.String appname)` Finds the path to an application on Linux using which.
    `static java.lang.String` | `getLinuxProgramPath(java.lang.String name)` Executes which to locate the application specified by name.
    `static boolean` | `isWindows()` Determines if the application is executing on a Windows OS.
    `static java.lang.Process` | `startProgram(java.lang.String app, java.lang.String path, java.lang.String... args)` Starts an application process.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ANSYS_VERSION

          public static final java.lang.String ANSYS_VERSION

      See Also:
        Constant Field Values

    - #### WHICH

          public static final java.lang.String WHICH

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Platform

          public Platform()

  - ### Method Detail

    - #### isWindows

          public static boolean isWindows()

      Determines if the application is executing on a Windows OS.
      Returns:
        Returns true if running on a windows OS.

    - #### findAppPathLinux

          public static final java.lang.String findAppPathLinux(java.lang.String appname)
                                                         throws java.io.IOException

      Finds the path to an application on Linux using which.
      Parameters:
        `appname` - - the applicaiton name
      Returns:
        Returns the path or null.
      Throws:
        `java.io.IOException` - if "which" processing failes.

    - #### getLinuxProgramPath

          public static final java.lang.String getLinuxProgramPath(java.lang.String name)
                                                            throws java.io.IOException

      Executes which to locate the application specified by name.
      Parameters:
        `name` - - the name
      Returns:
        Returns the path to the application or null.
      Throws:
        `java.io.IOException` - if "which" processing fails.

    - #### startProgram

          public static java.lang.Process startProgram(java.lang.String app,
                                                       java.lang.String path,
                                                       java.lang.String... args)
                                                throws java.io.IOException

      Starts an application process.
      Parameters:
        `app` - - the application name
        `path` - - the path to the application
        `args` - - arguments to be passed into the application
      Returns:
        Returns the process.
      Throws:
        `java.io.IOException` - if the process could not be created.