std_os
std_os
std_os provides operating system related features.
fetch std_os;
bark(os_type());
Returns the operating system. On a Windows machine "windows", on a MacOS machine "macos", on a unkown machine "unkown".
obj example = os_type();
bark(example); # 'windows', 'macos', or 'unknown' if the os is unknown
Returns the system PATH variable.
obj example = os_path();
bark(example);
Returns the full user directory (e.g. on Windows C:/Users/JohnDoe or on MacOS /Users/JohnDoe)
obj example = os_user_dir();
bark(example);
Returns the value of the OS environment variable var.
obj example = os_env("PATH");
bark(example);