irods
4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems. Fossies Dox: irods-4.2.8.tar.gz ("unofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file.
13 #include <boost/algorithm/string.hpp>
14 #include <boost/lexical_cast.hpp>
15 #include <boost/filesystem.hpp>
20 std::string& _env_file,
21 std::string& _session_file ) {
27 std::stringstream ppid_str; ppid_str << getppid();
31 std::string json_file;
36 return ERROR(-1,
"failed to get irods home directory");
38 std::string json_session_file = json_file;
40 char* irods_env = getenv(env_var.c_str());
41 if ( irods_env && strlen( irods_env ) > 0 ) {
42 json_file = irods_env;
48 json_session_file = json_file +
".cwd";
52 char* home_dir = getenv(
"HOME" );
60 json_session_file = json_file +
"." + ppid_str.str();
64 _env_file = json_file;
65 _session_file = json_session_file;
82 std::string json_file, json_session_file;
90 rodsLog(
LOG_ERROR,
"environment_properties::capture: missing environment file. should be at [%s]", json_file.c_str());
110 const std::string& _fn ) {
void rodsLog(int level, const char *formatStr,...)
#define THROW(_code, _msg)
static environment_properties & instance()
boost::filesystem::path get_irods_home_directory()
#define PASS(prev_error_)
T remove(const std::string &_key)
T remove(const std::string &_key)
auto exists(rcComm_t &conn, const user &user) -> bool
std::string to_env(const std::string &)
error get_json_environment_file(std::string &_env_file, std::string &_session_file)
T & set(const std::string &_key, const T &_val)
configuration_parser config_props_
static const std::string IRODS_JSON_ENV_FILE
error load(const std::string &)
#define ERROR(code_, message_)
const std::string CFG_IRODS_SESSION_ENVIRONMENT_FILE_KW("irods_session_environment_file")
const std::string CFG_IRODS_ENVIRONMENT_FILE_KW("irods_environment_file")
void capture_json(const std::string &)
std::string result() const