struct System::User
- System::User
- Struct
- Value
- Object
Defined in:
system/user.crConstant Summary
-
UID_MAX =
4294967295_u32
Constructors
-
.get(uid : Int) : User
Returns the user specified by the user ID.
-
.get(username : String) : User
Returns the user specified by the user name.
-
.get?(uid : Int) : User?
Returns the user specified by the user ID.
-
.get?(username : String) : User?
Returns the user specified by the user name.
Class Method Summary
-
.name(uid : Int) : String
Returns the user name for the given user ID.
-
.name?(uid : Int) : String?
Returns the user name for the given user ID.
-
.uid(username : String) : UInt32
Returns the user ID for the given user name.
-
.uid?(username : String) : UInt32?
Returns the user ID for the given user name.
Instance Method Summary
- #==(other : self)
-
#gid : UInt32
Returns the user group ID.
-
#group
Returns the primary
Group
for the user. -
#hash(hasher)
See
Object#hash(hasher)
-
#home : String
Returns the path for the user's home as a
String
. -
#info : String
Returns additional information about the user as a
String
. -
#name : String
Returns the user name as a
String
. -
#shell : String
Returns the path for the user's shell as a
String
. -
#to_s(io : IO)
Appends the user name to the given
IO
. -
#to_s : String
Returns a
String
representation of the user, it's user name. -
#uid : UInt32
Returns the user ID.
Constructor Detail
Returns the user specified by the user ID.
Raises System::User::NotFoundError
if not found.
Returns the user specified by the user name.
Raises System::User::NotFoundError
if not found.
Returns the user specified by the user ID.
Returns nil
if not found.
Returns the user specified by the user name.
Returns nil
if not found.
Class Method Detail
Returns the user name for the given user ID.
Raises System::User::NotFoundError
if no user exists.
Returns the user name for the given user ID.
Returns nil
if no user exists.
Returns the user ID for the given user name.
Raises System::User::NotFoundError
if no user exists.
Returns the user ID for the given user name.
Returns nil
if no user exists.