Uni/Group#
Interface to the group struct from <grp.h>.
Info
To use declarations from this page, include the <essence/uni/grp.hpp> header.
They are found within the essence::uni namespace.
-
class group#
Wrapper for the Unix
groupC struct.-
gid_t id() const noexcept#
Get the group id.
-
std::string name() const#
Get the group name.
-
std::string password() const#
Get the group password, typically
x, as the real password is often handled byshadow.
-
const std::vector<std::string> &members() const#
Get the members of the group as a vector of strings.
-
std::string str() const#
Get a string representation of the group, in the format returned by
getent
Example
uni::group g; // Comparable output to that of the `getent group` command io::printn("{}", g.str());
-
gid_t id() const noexcept#