Beispiel #1
0
bool SQLiteFileSystem::ensureDatabaseFileExists(const String& fileName, bool checkPathOnly)
{
    if (fileName.isEmpty())
        return false;

    if (checkPathOnly) {
        String dir = directoryName(fileName);
        return ensureDatabaseDirectoryExists(dir);
    }

    return fileExists(fileName);
}
bool SQLiteFileSystem::ensureDatabaseFileExists(const std::string& fileName, bool checkPathOnly)
{
    DLOG(INFO) << ">>>";
    if (fileName.empty()) {
        DLOG(INFO) << "<<< " << "FALSE";
        return false;
    }

    if (checkPathOnly) {
        std::string dir = directoryName(fileName);
        DLOG(INFO) << "<<<";
        return ensureDatabaseDirectoryExists(dir);
    }

    DLOG(INFO) << "<<<";
    return fileExists(fileName);
}