Package oshi.util
Class UserGroupInfo
java.lang.Object
oshi.util.UserGroupInfo
Utility class to temporarily cache the userID and group maps in *nix, for
parsing process ownership. Cache expires after one minute.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetGroupName(String groupId) Gets the group name for a given IDstatic StringGets a user from their IDstatic booleanDetermine whether the current process has elevated permissions such as sudo / Administrator
-
Method Details
-
isElevated
public static boolean isElevated()Determine whether the current process has elevated permissions such as sudo / Administrator- Returns:
- True if this process has elevated permissions
-
getUser
-
getGroupName
-