sysctlString
fn
string sysctlString(string name) @safeGets system information string using sysctl.
Parameters
name | Name 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);