- Qbs Manual
- List of Built-in Services
- Host Service
- Qbs 2.6.0

# Host Service

The `Host` service offers various information about the host environment, such as operating system names, platform name.

## Available Operations

### architecture

     Host.architecture(): string

Returns the host operating system architecture.

See qbs.architecture for the target-specific equivalent property. architecture.

This function was introduced in version 1.22.

### os

     Host.os(): string[]

Returns the host operating system names.

See the qbs.targetOS for the target-specific equivalent property.

This function was introduced in version 1.22.

### platform

     Host.platform(): string

Returns the host operating system platform.

See the qbs.targetPlatform for the target-specific equivalent property.

This function was introduced in version 1.22.

### osVersion

     Host.osVersion(): string

Returns the host operating system version. Currently, only defined for Windows and Apple platforms.

Consists of two or three numbers separated by dots. For example, `"10.9"` or `"6.3.9600"`.

This function was introduced in version 1.22.

### osBuildVersion

     Host.osBuildVersion(): string

Returns the host operating system build version. Currently, only defined for Windows and Apple platforms.

On Windows, this is the 4 or 5 digit Windows build number and is equivalent to versionPatch. On Apple platforms, this is a standard build number in the Apple versioning scheme. For example, `"13C64"`.

This function was introduced in version 1.22.

### osVersionParts

     Host.osVersionParts(): string[]

Returns the host operating system version as a list.

For example, Windows 8.1 (version 6.3.9600) would correspond to a value of `[6, 3, 9600]`.

This function was introduced in version 1.22.

### osVersionMajor

     Host.osVersionMajor(): number

Returns the host operating system major version.

This function was introduced in version 1.22.

### osVersionMinor

     Host.osVersionMinor(): number

Returns the host operating system minor version.

This function was introduced in version 1.22.

### osVersionPatch

     Host.osVersionPatch(): number

Returns the host operating system patch level.

This function was introduced in version 1.22.

### nullDevice

     Host.nullDevice(): string[]

Returns the platform-specific file path corresponding to the null device.

This function was introduced in version 1.22.