29 #include <boost/filesystem/path.hpp>
31 namespace RobotRaconteur
139 class NodeDirectoriesFD;
156 const RR_SHARED_PTR<RobotRaconteurNode>& node = RR_SHARED_PTR<RobotRaconteurNode>());
221 static bool ReadInfoFile(
const boost::filesystem::path& fname, std::map<std::string, std::string>& data);
232 static RR_SHARED_PTR<NodeDirectoriesFD>
CreatePidFile(
const boost::filesystem::path& path);
244 static RR_SHARED_PTR<NodeDirectoriesFD>
CreateInfoFile(
const boost::filesystem::path& path,
245 std::map<std::string, std::string> info);
256 const std::map<std::string, std::string>& updated_info);
286 RR_SHARED_PTR<NodeDirectoriesFD>
fd;
312 boost::string_ref name,
313 const std::vector<std::string>& scope);
GetUuidForNameAndLockResult GetUuidForNameAndLock(const NodeDirectories &node_dirs, boost::string_ref name, const std::vector< std::string > &scope)
Get a saved UUID for a name with a specified scope.
Structure to hold result of GetUuidForNameAndLock.
Definition: NodeDirectories.h:264
NodeID uuid
The UUID assigned to the name in specified domain.
Definition: NodeDirectories.h:271
std::string name
The identifier name.
Definition: NodeDirectories.h:276
boost::shared_ptr< NodeDirectoriesFD > fd
Lock for identifier. Release fd to release the lock.
Definition: NodeDirectories.h:286
std::vector< std::string > scope
The scope of the identifier.
Definition: NodeDirectories.h:281
Directories on local system used by the node.
Definition: NodeDirectories.h:45
boost::filesystem::path system_state_dir
Robot Raconteur System config directory.
Definition: NodeDirectories.h:72
boost::filesystem::path user_cache_dir
Robot Raconteur User cache directory.
Definition: NodeDirectories.h:126
boost::filesystem::path user_config_dir
Robot Raconteur User config directory.
Definition: NodeDirectories.h:108
boost::filesystem::path system_config_dir
Robot Raconteur System config directory.
Definition: NodeDirectories.h:63
boost::filesystem::path system_run_dir
Robot Raconteur System run directory.
Definition: NodeDirectories.h:90
boost::filesystem::path system_data_dir
Robot Raconteur System data directory.
Definition: NodeDirectories.h:54
boost::filesystem::path user_state_dir
Robot Raconteur User state directory.
Definition: NodeDirectories.h:117
boost::filesystem::path system_cache_dir
Robot Raconteur System cache directory.
Definition: NodeDirectories.h:81
boost::filesystem::path user_run_dir
Robot Raconteur User state directory.
Definition: NodeDirectories.h:136
boost::filesystem::path user_data_dir
Robot Raconteur User data directory.
Definition: NodeDirectories.h:99
Exception thrown by GetUuidForNameAndLockResult if the name with the specified scope is currently in ...
Definition: NodeDirectories.h:321
Utility functions for working with NodeDirectories.
Definition: NodeDirectories.h:146
static boost::shared_ptr< NodeDirectoriesFD > CreatePidFile(const boost::filesystem::path &path)
Create a pid file.
static bool IsLogonUserRoot()
Returns true if user is root.
static void RefreshInfoFile(const boost::shared_ptr< NodeDirectoriesFD > &h_info, const std::map< std::string, std::string > &updated_info)
Update key-value pairs in a file created with CreateInfoFile()
static boost::shared_ptr< NodeDirectoriesFD > CreateInfoFile(const boost::filesystem::path &path, std::map< std::string, std::string > info)
Create an info file with key-value pairs.
static NodeDirectories GetDefaultNodeDirectories(const boost::shared_ptr< RobotRaconteurNode > &node=boost::shared_ptr< RobotRaconteurNode >())
Get the Default Node Directories object.
static bool ReadInfoFile(const boost::filesystem::path &fname, std::map< std::string, std::string > &data)
Create directories with user permissions.
static std::string GetLogonUserName()
Get the logon name of the current user.
NodeID UUID storage and generation.
Definition: NodeID.h:58