Skip to content
GitLab
Projects
Groups
Snippets
/
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
"ServiceRegistry.hpp"
#include
<dirent.h>
namespace
xacc
{
namespace
xacc
{
void
ServiceRegistry
::
initialize
()
{
void
ServiceRegistry
::
initialize
()
{
...
@@ -20,6 +21,20 @@ void ServiceRegistry::initialize() {
...
@@ -20,6 +21,20 @@ void ServiceRegistry::initialize() {
}
}
const
std
::
string
xaccLibDir
=
std
::
string
(
XACC_INSTALL_DIR
)
+
std
::
string
(
"/lib"
);
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
);
XACCLogger
::
instance
()
->
info
(
"XACC Lib Directory: "
+
xaccLibDir
);
for
(
auto
&
entry
:
boost
::
filesystem
::
directory_iterator
(
xaccLibDir
))
{
for
(
auto
&
entry
:
boost
::
filesystem
::
directory_iterator
(
xaccLibDir
))
{
XACCLogger
::
instance
()
->
info
(
"TEST: "
+
entry
.
path
().
filename
().
string
());
XACCLogger
::
instance
()
->
info
(
"TEST: "
+
entry
.
path
().
filename
().
string
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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