Shell.doesCommandExist

Tries to determine if the given command exists.

Notes: In Powershell, Get-Command is used.

On Linux, which is used.

On Windows, where is used.

class Shell
static
bool
doesCommandExist
(
string command
)

Parameters

command string

The command/executable to check.

Return Value

Type: bool

true if the command exists, false otherwise.

Meta