MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / loadAttachmentData

Method loadAttachmentData

src/database/WizDatabase.cpp:4198–4213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4196}
4197
4198bool WizDatabase::loadAttachmentData(const CString& strDocumentGUID, QByteArray& arrayData)
4199{
4200 CString strFileName = getAttachmentFileName(strDocumentGUID);
4201 if (!WizPathFileExists(strFileName))
4202 {
4203 return false;
4204 }
4205
4206 QFile file(strFileName);
4207 if (!file.open(QFile::ReadOnly))
4208 return false;
4209
4210 arrayData = file.readAll();
4211
4212 return !arrayData.isEmpty();
4213}
4214
4215bool WizDatabase::loadCompressedAttachmentData(const QString& strGUID, QByteArray& arrayData)
4216{

Callers

nothing calls this directly

Calls 3

WizPathFileExistsFunction · 0.85
isEmptyMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected