Expand description
§Utility functions and data structures
Structs§
- Group
Entry - An entry to the /etc/group file.
- Passwd
Entry - An entry to the /etc/passwd file.
Enums§
- Triple
Bool - A bool but with three options,
TripleBool::Known,TripleBool::Unknown
Functions§
- errno
- Get the OS error, effectively the same as the errno macro in C
- file_
owned_ by_ gid - Check if the file named
nameis owned by the group with GIDgid - file_
owned_ by_ group - Check if the file named
fnameis owned by the group namedgname - file_
owned_ by_ uid - Check if the file named
nameis owned by the user with UIDuid - file_
owned_ by_ user - Check if the file named
fnameis owned by the user nameduname - get_
file_ group - Get the group owner of the file
- get_
file_ owner - Get the owner of the file
- get_
file_ owner_ gid - Gets the GID of the owner of the file
- get_
file_ owner_ uid - Gets the UID of the owner of the file
- group_
exists - Checks if a group named
nameexists on the system - is_
package_ installed - Check if a package is installed purely from the name
- user_
exists - Checks if a user with username
nameexists on the system - user_
is_ admin - Checks if the user has administrator privileges.
- user_
is_ in_ group - Checks if a user named
unameis in the group namedgname.