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

Function copyData

src/share/WizZip.cpp:49–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48
49static bool copyData(QIODevice &inFile, QIODevice &outFile)
50{
51 char* buf = new char[4096];
52 while (!inFile.atEnd()) {
53 memset(buf, 0, 4096);
54 qint64 readLen = inFile.read(buf, 4096);
55 if (readLen <= 0) {
56 delete [] buf;
57 return false;
58 }
59 if (outFile.write(buf, readLen) != readLen) {
60 delete [] buf;
61 return false;
62 }
63 }
64 delete [] buf;
65 return true;
66}
67
68/**OK
69 * Comprime il file fileName, nell'oggetto zip, con il nome fileDest.

Callers 3

compressFileMethod · 0.85
extractFileMethod · 0.85
extractTextMethod · 0.85

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected