OS Module
Provides functions to work with OS types.
Functions and values
| Function or value |
Description
|
Full Usage:
OS.isRunnable progName
Parameters:
string
-
The program name or path to check.
Returns: bool
true if the program exists at the given path or is found in PATH;
otherwise false.
|
Checks if the given program name is runnable in the current environment by searching the PATH environment variable.
|
|
Gets an OS value from a string. Accepts "windows" or "win", "linux", "macos"/"macosx"/"mac"/"osx", or "unknown" (case-insensitive). Raises UnknownOSException if the string is not recognized.
|
Full Usage:
OS.toString os
Parameters:
OS
-
The OS value to convert.
Returns: string
"Windows", "Linux", "Mac", or "UnknownOS".
|
Gets the string representation of the given OS value. Raises UnknownOSException for invalid values.
|
B2R2