Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
xacc
Commits
edc527fc
Commit
edc527fc
authored
Jan 31, 2018
by
Mccaskey, Alex
Browse files
updating dir search in service registry
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
8f434b3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
xacc/utils/ServiceRegistry.cpp
View file @
edc527fc
#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
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment