PicoScenes API Docs
 
Loading...
Searching...
No Matches
SystemTools::Shared Namespace Reference

Functions

uint32_t getUID ()
 Gets the user ID of the current process.
 
uint32_t getPID ()
 Gets the process ID of the current process.
 
uint32_t getParentPID ()
 Gets the parent process ID of the current process.
 
std::string getCurrentUserName ()
 Gets the current user's name.
 
std::string getFilePathForPID (uint32_t pid)
 Gets the file path for a given process ID.
 
std::string getCurrentProcessFullPath ()
 Gets the full path of the current process.
 
std::string getCurrentCommandLineContent ()
 Gets the command line content of the current process.
 
std::string getProcessName (uint32_t pid)
 Gets the name of a process given its process ID.
 
std::string invokeCommandLineCommand (const std::string &cmdString, int *returnStatus=nullptr)
 Invokes a command line command and returns its output.
 
std::string getKernelVersion ()
 Gets the kernel version of the operating system.
 
uint8_t getCPUNumber ()
 Gets the number of CPU cores.
 
uint64_t getSystemFreeMemory ()
 Gets the amount of free memory in the system.
 
void openURLWithDefaultBrowser (const std::string &url)
 Opens a URL with the default web browser.
 

Function Documentation

◆ getCPUNumber()

uint8_t SystemTools::Shared::getCPUNumber ( )

Gets the number of CPU cores.

Returns
The number of CPU cores.

◆ getCurrentCommandLineContent()

std::string SystemTools::Shared::getCurrentCommandLineContent ( )

Gets the command line content of the current process.

Returns
The command line content.

◆ getCurrentProcessFullPath()

std::string SystemTools::Shared::getCurrentProcessFullPath ( )

Gets the full path of the current process.

Returns
The full path of the current process.

◆ getCurrentUserName()

std::string SystemTools::Shared::getCurrentUserName ( )

Gets the current user's name.

Returns
The current user's name.

◆ getFilePathForPID()

std::string SystemTools::Shared::getFilePathForPID ( uint32_t  pid)

Gets the file path for a given process ID.

Parameters
pidThe process ID.
Returns
The file path of the process.

◆ getKernelVersion()

std::string SystemTools::Shared::getKernelVersion ( )

Gets the kernel version of the operating system.

Returns
The kernel version.

◆ getParentPID()

uint32_t SystemTools::Shared::getParentPID ( )

Gets the parent process ID of the current process.

Returns
The parent process ID.

◆ getPID()

uint32_t SystemTools::Shared::getPID ( )

Gets the process ID of the current process.

Returns
The process ID.

◆ getProcessName()

std::string SystemTools::Shared::getProcessName ( uint32_t  pid)

Gets the name of a process given its process ID.

Parameters
pidThe process ID.
Returns
The name of the process.

◆ getSystemFreeMemory()

uint64_t SystemTools::Shared::getSystemFreeMemory ( )

Gets the amount of free memory in the system.

Returns
The amount of free memory in bytes.

◆ getUID()

uint32_t SystemTools::Shared::getUID ( )

Gets the user ID of the current process.

Returns
The user ID.

◆ invokeCommandLineCommand()

std::string SystemTools::Shared::invokeCommandLineCommand ( const std::string &  cmdString,
int *  returnStatus = nullptr 
)

Invokes a command line command and returns its output.

Parameters
cmdStringThe command to execute.
returnStatusOptional pointer to store the return status.
Returns
The output of the command.

◆ openURLWithDefaultBrowser()

void SystemTools::Shared::openURLWithDefaultBrowser ( const std::string &  url)

Opens a URL with the default web browser.

Parameters
urlThe URL to open.