Table of Contents

Interface IPlatform

Namespace
FishMMO.Installer
Assembly
FishMMO-Installer.dll

Abstracts OS-specific operations so installer components don't scatter IsOSPlatform(OSPlatform) checks everywhere.

public interface IPlatform

Properties

IsLinux

True when running on Linux.

bool IsLinux { get; }

Property Value

bool

IsWindows

True when running on Windows.

bool IsWindows { get; }

Property Value

bool

Methods

GetShellCommand()

Returns the OS-appropriate shell executable and argument prefix. Windows: (cmd.exe, /c). Linux: fish if available, else bash.

(string shell, string argPrefix) GetShellCommand()

Returns

(string shell, string argPrefix)

IsCommandAvailableAsync(string)

Checks whether a given executable is available on PATH.

Task<bool> IsCommandAvailableAsync(string command)

Parameters

command string

Returns

Task<bool>