system.os - Palamecia/mint GitHub Wiki
system.os
Module Description
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.
Public members
Modifiers | Member | Description |
---|---|---|
const |
getEnvironment | Returns the value of the environment variable name if exists; otherwise returns ``... |
const |
getName | Returns the operating system current name. |
const |
getType | Returns the operating system type as a value of System.OperatingSystem.System ... |
const |
getVersion | Returns the operating system current version. |
const |
setEnvironment | Sets the value of the environment variable name to value . An instance of Syst ... |
const |
unsetEnvironment | Removes the value of the environment variable name . An instance of System.Ope ... |
Package members
Modifiers | Member | Description |
---|---|---|
const |
new | Internal constructor. |
Private members
Modifiers | Member | Description |
---|---|---|
@ |
g_lib | Global library handle. |
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.