MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / getFileInfoList

Method getFileInfoList

lib/QuaZip/quazip/quazip.cpp:716–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

714
715template<typename TFileInfo>
716bool QuaZipPrivate::getFileInfoList(QList<TFileInfo> *result) const
717{
718 QuaZipPrivate *fakeThis=const_cast<QuaZipPrivate*>(this);
719 fakeThis->zipError=UNZ_OK;
720 if (mode!=QuaZip::mdUnzip) {
721 qWarning("QuaZip::getFileNameList/getFileInfoList(): "
722 "ZIP is not open in mdUnzip mode");
723 return false;
724 }
725 QString currentFile;
726 if (q->hasCurrentFile()) {
727 currentFile = q->getCurrentFileName();
728 }
729 if (q->goToFirstFile()) {
730 do {
731 bool ok;
732 result->append(QuaZip_getFileInfo<TFileInfo>(q, &ok));
733 if (!ok)
734 return false;
735 } while (q->goToNextFile());
736 }
737 if (zipError != UNZ_OK)
738 return false;
739 if (currentFile.isEmpty()) {
740 if (!q->goToFirstFile())
741 return false;
742 } else {
743 if (!q->setCurrentFile(currentFile))
744 return false;
745 }
746 return true;
747}
748
749QStringList QuaZip::getFileNameList() const
750{

Callers 4

getFileListMethod · 0.80
largeFileMethod · 0.80
getFileNameListMethod · 0.80
getFileInfoList64Method · 0.80

Calls 7

hasCurrentFileMethod · 0.80
getCurrentFileNameMethod · 0.80
goToFirstFileMethod · 0.80
goToNextFileMethod · 0.80
isEmptyMethod · 0.80
setCurrentFileMethod · 0.80
appendMethod · 0.45

Tested by 2

getFileListMethod · 0.64
largeFileMethod · 0.64