RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
24 #ifndef LAUNCHER_PLUGINS_USER_HPP
25 #define LAUNCHER_PLUGINS_USER_HPP
33 namespace launcher_plugins {
46 namespace launcher_plugins {
49 typedef uid_t UidType;
50 typedef gid_t GidType;
77 explicit User(
bool in_isEmpty =
false);
91 User(
User&& in_other) noexcept =
default;
202 const std::string&
getShell()
const;
228 PRIVATE_IMPL(m_impl);
Class which represents a path on the system. May be any type of file (e.g. directory,...
Definition: FilePath.hpp:77
Class which represents a system user.
Definition: User.hpp:55
User(bool in_isEmpty=false)
Constructor.
const FilePath & getHomePath() const
Gets the user home path, if it exists.
bool operator==(const User &in_other) const
Equality operator.
User & operator=(const User &in_other)
Overloaded assignment operator.
static FilePath getUserHomePath(const std::string &in_envOverride=std::string())
Gets the user home path, as set in the environment.
const std::string & getShell() const
Returns the login shell of this user.
UidType getUserId() const
Gets the ID of this user.
GidType getGroupId() const
Gets the ID of this user's primary group.
bool exists() const
Checks whether the user represented by this object exists.
static Error getCurrentUser(User &out_currentUser)
Gets the current user.
Class which represents an error.
Definition: Error.hpp:174
bool isAllUsers() const
Returns whether this object represents all users or not. See the default constructor for more details...
const std::string & getRealName() const
Returns the user's real name ("John Doe", not "jdoe")
const std::string & getUsername() const
Returns the name of this user.
bool isEmpty() const
Checks whether this user is empty or not.
static Error getUserFromIdentifier(const std::string &in_username, User &out_user)
Gets a user from its username.
bool operator!=(const User &in_other) const
Inequality operator.