diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-09-13 04:21:26 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-09-13 04:21:26 +0200 |
commit | 8ef07ec6346a4f9c078184c9497e7c12f5b8c33d (patch) | |
tree | ddb81e3591825bd1cd5e080e1fcc4aede553d911 /logic/MMCZip.h | |
parent | 2315f463a8e7713fc62027bb9540a22b240a0f78 (diff) | |
download | PrismLauncher-8ef07ec6346a4f9c078184c9497e7c12f5b8c33d.tar.gz PrismLauncher-8ef07ec6346a4f9c078184c9497e7c12f5b8c33d.tar.bz2 PrismLauncher-8ef07ec6346a4f9c078184c9497e7c12f5b8c33d.zip |
GH-1227 allow structured world zip import and drag and drop out of MultiMC
Diffstat (limited to 'logic/MMCZip.h')
-rw-r--r-- | logic/MMCZip.h | 31 |
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); +} |