summaryrefslogtreecommitdiffstats
path: root/logic/MMCZip.h
diff options
context:
space:
mode:
Diffstat (limited to 'logic/MMCZip.h')
-rw-r--r--logic/MMCZip.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/logic/MMCZip.h b/logic/MMCZip.h
index a3167079..f350e668 100644
--- a/logic/MMCZip.h
+++ b/logic/MMCZip.h
@@ -57,5 +57,32 @@ namespace MMCZip
* left empty.
* \return The list of the full paths of the files extracted, empty on failure.
*/
- QStringList MULTIMC_LOGIC_EXPORT extractDir(QString fileCompressed, QString dir = QString());
-} \ No newline at end of file
+ QStringList MULTIMC_LOGIC_EXPORT extractDir(QString fileCompressed, QString dir = QString());
+
+ /**
+ * Find a single file in archive by file name (not path)
+ *
+ * \return the path prefix where the file is
+ */
+ QString MULTIMC_LOGIC_EXPORT findFileInZip(QuaZip * zip, const QString & what, const QString &root = QString());
+
+ /**
+ * Find a multiple files of the same name in archive by file name
+ * If a file is found in a path, no deeper paths are searched
+ *
+ * \return true if anything was found
+ */
+ bool MULTIMC_LOGIC_EXPORT findFilesInZip(QuaZip * zip, const QString & what, QStringList & result, const QString &root = QString());
+
+ /**
+ * Extract a single file to a destination
+ *
+ * \return true if it succeeds
+ */
+ bool MULTIMC_LOGIC_EXPORT extractFile(QuaZip *zip, const QString &fileName, const QString &fileDest);
+
+ /**
+ * Extract a subdirectory from an archive
+ */
+ QStringList MULTIMC_LOGIC_EXPORT extractSubDir(QuaZip *zip, const QString & subdir, const QString &target);
+}