MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / extractFile

Function extractFile

launcher/MMCZip.cpp:279–295  ·  view source on GitHub ↗

ours

Source from the content-addressed store, hash-verified

277
278// ours
279bool extractFile(QString fileCompressed, QString file, QString target)
280{
281 // check if this is a minimum size empty zip file...
282 QFileInfo fileInfo(fileCompressed);
283 if (fileInfo.size() == 22) {
284 return true;
285 }
286 ArchiveReader zip(fileCompressed);
287 auto f = zip.goToFile(file);
288 if (!f) {
289 return false;
290 }
291 auto extPtr = ArchiveWriter::createDiskWriter();
292 auto ext = extPtr.get();
293
294 return f->writeFile(ext, target);
295}
296
297bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFileFunction excludeFilter)
298{

Callers 1

extractModsMethod · 0.85

Calls 4

goToFileMethod · 0.80
writeFileMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected