xentara-utils v2.0.4
The Xentara Utility Library
|
System related functionality. More...
Classes | |
class | SystemInfo |
This class can be used to access some real-time relevant properties of the system. More... | |
Typedefs | |
using | Pid = unsigned long |
The type used by the operating system to represent PIDs. | |
Enumerations | |
enum | UserNameType { UserName , DisplayName , PrincipalName , QualifiedName } |
String formats for user names. More... | |
Functions | |
auto | pid () noexcept -> Pid |
Gets the PID of the calling process. | |
auto | userName (UserNameType type=UserNameType::UserName) -> std::string |
Gets the current user name. | |
System related functionality.
This namespace contains system introspection functionality.
using xentara::utils::system::Pid = typedef unsigned long |
The type used by the operating system to represent PIDs.
This is a DWORD under Windows, and a pid_t everywhere else.
#include <xentara/utils/system/pid.hpp>
String formats for user names.
#include <xentara/utils/system/user.hpp>
|
noexcept |
Gets the PID of the calling process.
#include <xentara/utils/system/pid.hpp>
auto xentara::utils::system::userName | ( | UserNameType | type = UserNameType::UserName | ) | -> std::string |
Gets the current user name.
This function returns user name of the effective user. Normally, the effective user is the the user under which the calling ptocess is running. However, the effective user can be change by the application:
#include <xentara/utils/system/user.hpp>
type | The type of user name to return. |