17 bool oExistSQLDBDir =
false;
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;
54 boost::filesystem::path lTravelDBFilePath (iTravelDBFilePath.begin(),
55 iTravelDBFilePath.end());
58 <<
"') will be cleared");
59 boost::filesystem::remove_all (lTravelDBFilePath);
62 boost::filesystem::create_directories (lTravelDBFilePath);
65 if (!(boost::filesystem::exists (lTravelDBFilePath)
66 && boost::filesystem::is_directory (lTravelDBFilePath))) {
67 std::ostringstream oStr;
68 oStr <<
"The directory for the Xapian database/index ('"
69 << lTravelDBFilePath <<
"') cannot be created; check file-system "
70 <<
"permissions and whether the file-system is writable";