34inline namespace Services {
40 return Configuration::getPath(filename);
44 string silent_command = command +
" > /dev/null";
57 if (fgets(buffer.
data(), BUFSIZ, cmdpipe.
get()) !=
nullptr) {
65 return boost::filesystem::is_directory(local_dir);
69 if (not local_file.has_parent_path()) {
72 const path dir = local_file.parent_path();
74 boost::filesystem::create_directories(dir);
83 const string codeen_prefix(
"WORKSPACE");
84 const string prefix_env_variable(codeen_prefix);
95 string::size_type offset(0);
96 for (
auto substr : substrings) {
97 offset = input.
find(substr, offset);
98 if (offset == string::npos) {
provide functions to retrieve configuration files
Defines a class to handle the Environment.
Python dictionary-like Environment interface.
std::string get(const std::string &index, const std::string &default_value="") const
ELEMENTS_API std::string environmentVariable(std::string name)
Get the value of an environment variable.
ELEMENTS_API path confFilePath(path filename)
ELEMENTS_API path localWorkspacePrefix()
ELEMENTS_API std::pair< std::string, std::string > runCommandAndCaptureOutErr(std::string command)
ELEMENTS_API std::string lower(std::string text)
Path::Item path
importing the path item from ElementsKernel
ELEMENTS_API bool checkCall(const std::string &command)
ELEMENTS_API void createLocalDirOf(path localFile)
ELEMENTS_API bool containsInThisOrder(std::string input, std::vector< std::string > substrings)
ELEMENTS_API bool localDirExists(path localDir)