system.os - Palamecia/mint GitHub Wiki
Module
load system.os
This module provides tools to manage the operating system informations.
Packages
Enums
System.OSType
This enum describe each supported operating system types.
Constant | Value | Description |
---|---|---|
Linux | 0 |
Linux family operating system type. |
MacOs | 2 |
Mac OS family operating system type. |
Windows | 1 |
Windows family operating system type. |
Classes
System.OperatingSystem
This class provides an interface to manage the operating system informations.
Members
Modifiers | Member | Description |
---|---|---|
- @ |
g_lib | Global library handle. |
+ const |
getEnvironment | Returns the value of the environment variable name if exists; otherwise ret... |
+ const |
getName | Returns the operating system current name. |
+ const |
getType | Returns the operating system type as a value of System.OSType. |
+ const |
getVersion | Returns the operating system current version. |
~ const |
new | Internal constructor. |
+ const |
setEnvironment | Sets the value of the environment variable name to value . An instance of ... |
+ const |
unsetEnvironment | Removes the value of the environment variable name . An instance of Exceptio... |
Constants
Descriptions
System.OS
System.OperatingSystem ()
Global operating system instance
System.OSType.Linux
0
Linux family operating system type.
System.OSType.MacOs
2
Mac OS family operating system type.
System.OSType.Windows
1
Windows family operating system type.
System.OperatingSystem.g_lib
lib ('libmint-system')
Global library handle.
System.OperatingSystem.getEnvironment
def (const self, name, defaultValue = none)
Returns the value of the environment variable name
if exists;
otherwise returns defaultValue
.
System.OperatingSystem.getName
def (const self)
Returns the operating system current name.
System.OperatingSystem.getType
def (const self)
Returns the operating system type as a value of System.OSType.
System.OperatingSystem.getVersion
def (const self)
Returns the operating system current version.
System.OperatingSystem.new
none
Internal constructor.
System.OperatingSystem.setEnvironment
def (const self, name, value)
Sets the value of the environment variable name
to value
.
An instance of Exception.SystemError is raised on error.
System.OperatingSystem.unsetEnvironment
def (self, name)
Removes the value of the environment variable name
.
An instance of Exception.SystemError is raised on error.