7.7. Posix System Databases
Prev | Chapter 7. The `posix` package: POSIX support | Next

## 7.7. Posix System Databases

    groupName    :: GroupEntry -> String
    groupID      :: GroupEntry -> GroupID
    groupMembers :: GroupEntry -> [String]

    getGroupEntryForID :: GroupID -> IO GroupEntry

`getGroupEntryForID gid` calls `getgrgid` to obtain the `GroupEntry` information associated with `GroupID` `gid`.

The operation may fail with:

`NoSuchThing`

  There is no group entry for the GroupID.

    getGroupEntryForName :: String -> IO GroupEntry

`getGroupEntryForName name` calls `getgrnam` to obtain the `GroupEntry` information associated with the group called `name`.

The operation may fail with:

`NoSuchThing`

  There is no group entry for the name.

    userName      :: UserEntry -> String
    userID        :: UserEntry -> UserID
    userGroupID   :: UserEntry -> GroupID
    homeDirectory :: UserEntry -> String
    userShell     :: UserEntry -> String

    getUserEntryForID :: UserID -> IO UserEntry

`getUserEntryForID gid` calls `getpwuid` to obtain the `UserEntry` information associated with `UserID` `uid`. The operation may fail with:

`NoSuchThing`

  There is no user entry for the UserID.

    getUserEntryForName :: String -> IO UserEntry

`getUserEntryForName name` calls `getpwnam` to obtain the `UserEntry` information associated with the user login `name`.

The operation may fail with:

`NoSuchThing`

  There is no user entry for the name.

Prev | Up | Next
7.6. Posix, Device- and Class-Specific Functions | Home | 7.8. POSIX Errors