8 #include <boost/filesystem.hpp>
17 bool oExistSQLDBDir =
true;
20 boost::filesystem::path lSQLiteDBFullPath (iSQLDBConnStr.begin(),
24 boost::filesystem::path lSQLiteDBParentPath =
25 lSQLiteDBFullPath.parent_path();
28 oExistSQLDBDir = boost::filesystem::exists (lSQLiteDBParentPath)
29 && boost::filesystem::is_directory (lSQLiteDBParentPath);
31 return oExistSQLDBDir;
38 boost::filesystem::path lTravelDBFilePath (iTravelDBFilePath.begin(),
39 iTravelDBFilePath.end());
42 <<
"') will be cleared");
43 boost::filesystem::remove_all (lTravelDBFilePath);
46 boost::filesystem::create_directories (lTravelDBFilePath);
49 if (!(boost::filesystem::exists (lTravelDBFilePath)
50 && boost::filesystem::is_directory (lTravelDBFilePath))) {
51 std::ostringstream oStr;
52 oStr <<
"The file-path to the Xapian database/index ('"
53 << lTravelDBFilePath <<
"') does not exist or is not a directory.";
#define OPENTREP_LOG_ERROR(iToBeLogged)
#define OPENTREP_LOG_DEBUG(iToBeLogged)
static bool checkSQLiteDirectory(const std::string &iSQLDBConnStr)
static void recreateXapianDirectory(const std::string &iTravelDBFilePath)