currentPlatform

fnPlatform currentPlatform() @safe @nogc nothrow

Gets the current platform.

Returns

The current platform identifier.

Example:

auto platform = currentPlatform();
version (linux) assert(platform == Platform.LINUX);