A collection of utilities related to the running process.

export

### Hierarchy

- ProcessUtils

## Index

### Methods

- getBasicSystemInfo
- isGuiAvailable
- nextTick
- openInDefaultApp
- openInEditor

## Methods

### Static getBasicSystemInfo

- getBasicSystemInfo(): ISystemInfo

- - Defined in @zowe/imperative/src/utilities/src/ProcessUtils.ts:91

  Get some basic information about the system

  #### Returns ISystemInfo

### Static isGuiAvailable

- isGuiAvailable(): GuiResult

- - Defined in @zowe/imperative/src/utilities/src/ProcessUtils.ts:62

  Is a Graphical User Interface available in the environment in which the current command is running?

  #### Returns GuiResult

  - True if GUI. False when no GUI.

### Static nextTick

- nextTick(callback: (...args: any[]) => void, ...args: any[]): Promise<void>

- - Defined in @zowe/imperative/src/utilities/src/ProcessUtils.ts:46

  Process utility to wrap callback process routines into promises Turn nextTick into a promise to prevent nesting

  static
  memberof

    ProcessUtils

  #### Parameters

  - ##### callback: (...args: any[]) => void

    called before promise is resolved

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  - ##### Rest ...args: any[]

    arguments passed to the callback

  #### Returns Promise<void>

  - fulfilled whenever callback is invoked

### Static openInDefaultApp

- openInDefaultApp(pathOrUrl: string): void

- - Defined in @zowe/imperative/src/utilities/src/ProcessUtils.ts:104

  Open a file or URL in the default application associated with its file extension or URL protocol. This method is only supported in graphical environments.

  #### Parameters

  - ##### pathOrUrl: string

    File path or Internet URL to open

  #### Returns void

### Static openInEditor

- openInEditor(filePath: string, editor?: string, sync?: boolean): void

- - Defined in @zowe/imperative/src/utilities/src/ProcessUtils.ts:128

  Open a file in the best editor that can be found in the current environment. In a graphical environment, the default application associated with its file extension will be launched. In a command-line environment, the file will be opened in vi.

  #### Parameters

  - ##### filePath: string

    File path to edit

  - ##### Optional editor: string

    Program name of editor to override the default (e.g., notepad)

  - ##### Optional sync: boolean

    Boolean where true == synchronous and false == asynchronous

  #### Returns void

Generated using TypeDoc