struct System::Group
- System::Group
- Struct
- Value
- Object
Defined in:
system/group.crConstant Summary
-
GID_MAX =
4294967295_u32 -
NGROUPS_MAX =
LibC::NGROUPS_MAX
Constructors
-
.get(gid : Int) : Group
Returns the group specified by the group ID.
-
.get(groupname : String) : Group
Returns the group specified by the groupname.
-
.get?(gid : Int) : Group?
Returns the group specified by the group ID.
-
.get?(groupname : String) : Group?
Returns the group specified by the group name.
Class Method Summary
-
.gid(groupname : String) : UInt32
Returns the group ID for the given group name.
-
.gid?(groupname : String) : UInt32?
Returns the group ID for the given group name.
-
.name(gid : Int) : String
Returns the group name for the given group ID.
-
.name?(gid : Int) : String?
Returns the group name for the given group ID.
Instance Method Summary
- #==(other : self)
-
#each_member(&block : User -> Nil) : Nil
Yields members as
Users. -
#each_member_name(&block : String -> Nil) : Nil
Yields member names as
Strings. -
#gid : UInt32
Returns the group ID.
-
#hash(hasher)
See
Object#hash(hasher) -
#member_names : Array(String)
Returns an
Arrayof the member names asStrings. -
#members : Array(User)
Returns an
Arrayof the members asUsers. -
#name : String
Returns the group name as a
String. -
#to_s(io : IO)
Appends the group name to the given
IO. -
#to_s : String
Returns a
Stringrepresentation of the group, it's group name.
Constructor Detail
Returns the group specified by the group ID.
Raises System::Group::NotFoundError if not found.
Returns the group specified by the groupname.
Raises System::Group::NotFoundError if not found.
Returns the group specified by the group ID.
Returns nil if not found.
Returns the group specified by the group name.
Returns nil if not found.
Class Method Detail
Returns the group ID for the given group name.
Raises System::Group::NotFoundError if group does not exist.
Returns the group ID for the given group name.
Returns nil if no group exists.
Returns the group name for the given group ID.
Raises System::Group::NotFoundError if group does not exist.
Returns the group name for the given group ID.
Returns nil if no group exists.