0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
ServiceUtilities.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
// Boost::Filesystem
7
#include <boost/filesystem.hpp>
8
// OpenTREP
9
#include <
opentrep/service/Logger.hpp
>
10
#include <
opentrep/service/ServiceUtilities.hpp
>
11
12
namespace
OPENTREP
{
13
14
// //////////////////////////////////////////////////////////////////////
15
bool
ServiceUtilities::isDirectory
(
const
std::string& iPath) {
16
bool
oIsDirectory =
false
;
17
18
if
(boost::filesystem::exists (iPath) ==
true
) {
19
20
if
(boost::filesystem::is_directory (iPath) ==
true
) {
21
oIsDirectory =
true
;
22
23
}
else
{
24
OPENTREP_LOG_ERROR
(iPath <<
" exists, but is not a directory"
);
25
}
26
27
}
else
{
28
OPENTREP_LOG_ERROR
(iPath <<
" does not exist"
);
29
}
30
31
return
oIsDirectory;
32
}
33
34
}
Logger.hpp
OPENTREP_LOG_ERROR
#define OPENTREP_LOG_ERROR(iToBeLogged)
Definition
Logger.hpp:24
ServiceUtilities.hpp
OPENTREP::ServiceUtilities::isDirectory
static bool isDirectory(const std::string &iPath)
Definition
ServiceUtilities.cpp:15
OPENTREP
Definition
BasChronometer.cpp:10
Generated on Mon May 5 2025 00:00:00 for OpenTREP by
1.13.2