sysctlString

fnstring sysctlString(string name) @safe

Gets system information string using sysctl.

Parameters

nameName of the sysctl value to retrieve (e.g., "kern.ostype").

Returns

String value from sysctl.

Throws

Exception if sysctl fails.

Example:

auto ostype = sysctlString("kern.ostype");
writeln("OS type: ", ostype);