uvw 3.1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
uvw::passwd_info Struct Reference

Utility class. More...

#include <util.h>

Public Member Functions

std::string username () const noexcept
 Gets the username.
 
decltype(uv_passwd_t::uid) uid () const noexcept
 Gets the uid.
 
decltype(uv_passwd_t::gid) gid () const noexcept
 Gets the gid.
 
std::string shell () const noexcept
 Gets the shell.
 
std::string homedir () const noexcept
 Gets the homedir.
 
 operator bool () const noexcept
 Checks if the instance contains valid data.
 

Detailed Description

Utility class.

This class can be used to query the subset of the password file entry for the current effective uid (not the real uid).

See also
utilities::passwd

Definition at line 114 of file util.h.

Member Function Documentation

◆ gid()

decltype(uv_passwd_t::gid) uvw::passwd_info::gid ( ) const
noexcept

Gets the gid.

Returns
The gid of the current effective uid (not the real uid).

◆ homedir()

std::string uvw::passwd_info::homedir ( ) const
noexcept

Gets the homedir.

Returns
The homedir of the current effective uid (not the real uid).

◆ operator bool()

uvw::passwd_info::operator bool ( ) const
noexcept

Checks if the instance contains valid data.

Returns
True if data are all valid, false otherwise.

◆ shell()

std::string uvw::passwd_info::shell ( ) const
noexcept

Gets the shell.

Returns
The shell of the current effective uid (not the real uid).

◆ uid()

decltype(uv_passwd_t::uid) uvw::passwd_info::uid ( ) const
noexcept

Gets the uid.

Returns
The current effective uid (not the real uid).

◆ username()

std::string uvw::passwd_info::username ( ) const
noexcept

Gets the username.

Returns
The username of the current effective uid (not the real uid).

The documentation for this struct was generated from the following file: