Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonathanstowe/unix-groups
Access to the Unix group file in Raku
https://github.com/jonathanstowe/unix-groups
group permissions raku unix
Last synced: 18 days ago
JSON representation
Access to the Unix group file in Raku
- Host: GitHub
- URL: https://github.com/jonathanstowe/unix-groups
- Owner: jonathanstowe
- License: artistic-2.0
- Created: 2015-10-28T17:25:48.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-02T08:08:54.000Z (over 1 year ago)
- Last Synced: 2023-07-02T09:23:16.648Z (over 1 year ago)
- Topics: group, permissions, raku, unix
- Language: Raku
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# Unix::Groups
Access to the Unix group file in Raku
![Build Status](https://github.com/jonathanstowe/Unix-Groups/workflows/CI/badge.svg)
## Synopsis
```raku
use Unix::Groups;my $groups = Unix::Groups.new;
say "The logged in user is member of these groups:";
for $groups.groups-for-user($*USER.Str) -> $group {
say $group.name;
}
```## Description
This module provides access to the group details from ```/etc/group```,
with similar to ```getgrent()```, ```getgrnam``` and ```getgrgid```
in the Unix standard C library.The methods either return a Unix::Groups::Group object or an array of
those objects.Because this module goes directly to the group file, if your system is
configured to retrieve its group information from e.g. NIS or LDAP it
may not necessarily reflect all the groups present, just the local ones.## Installation
Assuming you have a working Rakudo installation you should be able to install this with *zef* :
# From the source directory
zef install .# Remote installation
zef install User::Groups
## Support
Suggestions/patches are welcomed via github at https://github.com/jonathanstowe/User-Groups/issues
## Licence
This is free software.
Please see the [LICENCE](LICENCE) file in the distribution
© Jonathan Stowe 2015 - 2021