uvw  1.14.1
Public Member Functions | List of all members
uvw::Passwd Struct Reference

Utility class. More...

#include <util.hpp>

Public Member Functions

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

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 225 of file util.hpp.

Member Function Documentation

◆ gid()

auto uvw::Passwd::gid ( ) const
inlinenoexcept

Gets the gid.

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

Definition at line 248 of file util.hpp.

◆ homedir()

std::string uvw::Passwd::homedir ( ) const
inlinenoexcept

Gets the homedir.

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

Definition at line 264 of file util.hpp.

◆ operator bool()

uvw::Passwd::operator bool ( ) const
inlinenoexcept

Checks if the instance contains valid data.

Returns
True if data are all valid, false otherwise.

Definition at line 272 of file util.hpp.

◆ shell()

std::string uvw::Passwd::shell ( ) const
inlinenoexcept

Gets the shell.

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

Definition at line 256 of file util.hpp.

◆ uid()

auto uvw::Passwd::uid ( ) const
inlinenoexcept

Gets the uid.

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

Definition at line 240 of file util.hpp.

◆ username()

std::string uvw::Passwd::username ( ) const
inlinenoexcept

Gets the username.

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

Definition at line 232 of file util.hpp.


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