public virtual SqlFile addFile(string fileName) { SqlFsErrCode.CurrentError = FsErr.OK; SqlFile newFile = null; fsLocker.FsLock; SqlFsTransaction fsTran = new SqlFsTransaction(db); try { newFile = __addFile(fileName); if (newFile != null) { fsTran.fsOpSuccess(); } } finally { fsTran.dispose(); fsLocker.dispose(); } return(newFile); }
public override bool delete() { SqlFsErrCode.CurrentError = FsErr.OK; bool isOK = false; fsLocker.FsLock; SqlFsTransaction fsTran = new SqlFsTransaction(db); try { isOK = __delete(); if (isOK) { fsTran.fsOpSuccess(); } } finally { fsTran.dispose(); fsLocker.dispose(); } return(isOK); }
public virtual SqlDir addDir(string dirName) { SqlFsErrCode.CurrentError = FsErr.OK; SqlDir childDir = null; fsLocker.FsLock; SqlFsTransaction fsTran = new SqlFsTransaction(db); try { childDir = __addDir(dirName); if (childDir != null) { fsTran.fsOpSuccess(); } } finally { fsTran.dispose(); fsLocker.dispose(); } return(childDir); }
public virtual bool saveFileData(IFileData fileData) { SqlFsErrCode.CurrentError = FsErr.OK; bool isOK = false; fsLocker.FsLock; SqlFsTransaction fsTran = new SqlFsTransaction(db); try { isOK = __saveFileData(fileData); if (isOK) { fsTran.fsOpSuccess(); } } finally { fsTran.dispose(); fsLocker.dispose(); } return(isOK); }
public virtual bool move(SqlDir destDir) { SqlFsErrCode.CurrentError = FsErr.OK; bool isOK = false; fsLocker.FsLock; SqlFsTransaction fsTran = new SqlFsTransaction(db); try { isOK = __move(destDir); if (isOK) { fsTran.fsOpSuccess(); } } finally { fsTran.dispose(); fsLocker.dispose(); } return(isOK); }
public virtual bool rename(string newName) { SqlFsErrCode.CurrentError = FsErr.OK; bool isOK = false; fsLocker.FsLock; SqlFsTransaction fsTran = new SqlFsTransaction(db); try { isOK = __rename(newName); if (isOK) { fsTran.fsOpSuccess(); } } finally { fsTran.dispose(); fsLocker.dispose(); } return(isOK); }
public virtual void writeInfo(string infoName, string infoVal) { SqlFsErrCode.CurrentError = FsErr.OK; fsLocker.FsLock; SqlFsTransaction fsTran = new SqlFsTransaction(db); try { __writeInfo(infoName, infoVal); fsTran.fsOpSuccess(); } catch (SQLiteException) { } finally { fsTran.dispose(); fsLocker.dispose(); } }