Skip to content
sanya_fritz edited this page Apr 20, 2024 · 2 revisions

Documentation for the System namespace

This library provides functions for accessing system information and executing system-related commands.

Functions

  • int System.execute(string command): Executes a system command.

    • Parameters:
      • command: The command to be executed.
    • Returns: The return value of the command.
  • string System.get_current_dir(): Retrieves the current directory.

    • Returns: A string representing the current directory.
  • string System.os(): Retrieves the name of the operating system.

    • Returns: A string representing the name of the operating system.
  • int System.getAvailableRAM(): Retrieves the available RAM in bytes.

    • Returns: The available RAM in bytes.
  • int System.getTotalRAM(): Retrieves the total RAM in gigabytes.

    • Returns: The total RAM in gigabytes.
  • string System.getCPUName(): Retrieves the name of the CPU.

    • Returns: A string representing the name of the CPU.

#ifdef _WIN32 || _WIN64

  • string System.readRegistryValue(HKEY hKey, const string& subKey, const string& valueName): Reads a value from the Windows registry.
    • Parameters:
      • hKey: The handle to the base key of the registry.
      • subKey: The subkey to be opened.
      • valueName: The name of the value to be retrieved.
    • Returns: The value retrieved from the registry. #endif

Clone this wiki locally