#include "CSQLiteFileSystemExtension.h" #include #include #include #include using namespace lf; using namespace os; CSQLiteFileSystemExtension::CSQLiteFileSystemExtension() : filesystem(0) { //ctor } CSQLiteFileSystemExtension::~CSQLiteFileSystemExtension() { //dtor for (u32 i = 0; i < DBs.size(); ++i) { sqlite3_close(DBs[i]); } if (filesystem) { filesystem->drop(); } } void CSQLiteFileSystemExtension::setOwningFileSystem(CFileSystem* fs) { assert(fs); if (filesystem) { filesystem->drop(); } fs->grab(); filesystem = fs; } const c8* CSQLiteFileSystemExtension::getFileSystemIdentifier() const { static const c8* id = "db"; return id; } bool CSQLiteFileSystemExtension::existFile(const c8* filename, core::stringc *path) { if(path) { *path = ""; } for (u32 i=0; i