0.6.0
C++ Open Travel Request Parsing Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
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
}
OPENTREP_LOG_ERROR
#define OPENTREP_LOG_ERROR(iToBeLogged)
Definition:
Logger.hpp:23
Logger.hpp
OPENTREP::ServiceUtilities::isDirectory
static bool isDirectory(const std::string &iPath)
Definition:
ServiceUtilities.cpp:15
ServiceUtilities.hpp
Generated on Mon Feb 3 2014 14:17:07 for OpenTREP by
1.8.6