Commit edc527fc authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

updating dir search in service registry


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 8f434b3a
#include "ServiceRegistry.hpp"
#include <dirent.h>
namespace xacc {
void ServiceRegistry::initialize() {
......@@ -20,6 +21,20 @@ void ServiceRegistry::initialize() {
}
const std::string xaccLibDir = std::string(XACC_INSTALL_DIR) + std::string("/lib");
DIR *dir;
struct dirent *ent;
if ((dir = opendir (xaccLibDir.c_str())) != NULL) {
/* print all the files and directories within directory */
while ((ent = readdir (dir)) != NULL) {
printf ("DIRENT: %s\n", ent->d_name);
}
closedir (dir);
} else {
/* could not open directory */
perror ("");
}
XACCLogger::instance()->info("XACC Lib Directory: " + xaccLibDir);
for (auto &entry : boost::filesystem::directory_iterator(xaccLibDir)) {
XACCLogger::instance()->info("TEST: " + entry.path().filename().string());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment