BmnRoot
Loading...
Searching...
No Matches
fles::system Namespace Reference

Namespace for system-related utilty functions. More...

Functions

std::string stringerror (int errnum)
 Textual description of system error messages.
 
std::string current_username ()
 Retrieve current user name.
 
std::string current_hostname ()
 Retrieve current host name.
 
std::string current_domainname ()
 Retrieve current domain name.
 

Detailed Description

Namespace for system-related utilty functions.

Function Documentation

◆ current_domainname()

std::string fles::system::current_domainname ( )

Retrieve current domain name.

This is a thin C++ wrapper around getdomainname(), which gets the standard NIS domain name for the current host.

Returns
current domain name

◆ current_hostname()

std::string fles::system::current_hostname ( )

Retrieve current host name.

This is a thin C++ wrapper around gethostname(), which gets the name of the current host.

Returns
current host name

Referenced by fles::ArchiveDescriptor::ArchiveDescriptor().

◆ current_username()

std::string fles::system::current_username ( )

Retrieve current user name.

This is a thin C++ wrapper around getpwuid_r(), which obtains information from the system password database.

Returns
user name corresponding to current process

Referenced by fles::ArchiveDescriptor::ArchiveDescriptor().

◆ stringerror()

std::string fles::system::stringerror ( int  errnum)

Textual description of system error messages.

This is a thin C++ wrapper around strerror_r(), which looks up the error message string corresponding to an error number.

Parameters
errnumError number
Returns
message string