diff options
author | Jamie Mansfield <jmansfield@cadixdev.org> | 2020-08-24 23:13:43 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-02-07 23:30:24 +0100 |
commit | ab19b863417d7cfca7ff1a5121c2f41ed0a722d9 (patch) | |
tree | 9e6f2749f8be48315670bb222b2b3d83be799d80 /api/logic/MMCZip.h | |
parent | 5e980ceef20ea7087b3c04fb7e7691f29363fa3b (diff) | |
download | PrismLauncher-ab19b863417d7cfca7ff1a5121c2f41ed0a722d9.tar.gz PrismLauncher-ab19b863417d7cfca7ff1a5121c2f41ed0a722d9.tar.bz2 PrismLauncher-ab19b863417d7cfca7ff1a5121c2f41ed0a722d9.zip |
GH-405 ATLauncher Support
Diffstat (limited to 'api/logic/MMCZip.h')
-rw-r--r-- | api/logic/MMCZip.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/api/logic/MMCZip.h b/api/logic/MMCZip.h index fca7dde0..beff2e4d 100644 --- a/api/logic/MMCZip.h +++ b/api/logic/MMCZip.h @@ -59,6 +59,8 @@ namespace MMCZip */ QStringList MULTIMC_LOGIC_EXPORT extractSubDir(QuaZip *zip, const QString & subdir, const QString &target); + bool MULTIMC_LOGIC_EXPORT extractRelFile(QuaZip *zip, const QString & file, const QString &target); + /** * Extract a whole archive. * @@ -67,4 +69,25 @@ namespace MMCZip * \return The list of the full paths of the files extracted, empty on failure. */ QStringList MULTIMC_LOGIC_EXPORT extractDir(QString fileCompressed, QString dir); + + /** + * Extract a subdirectory from an archive + * + * \param fileCompressed The name of the archive. + * \param subdir The directory within the archive to extract + * \param dir The directory to extract to, the current directory if left empty. + * \return The list of the full paths of the files extracted, empty on failure. + */ + QStringList MULTIMC_LOGIC_EXPORT extractDir(QString fileCompressed, QString subdir, QString dir); + + /** + * Extract a single file from an archive into a directory + * + * \param fileCompressed The name of the archive. + * \param file The file within the archive to extract + * \param dir The directory to extract to, the current directory if left empty. + * \return true for success or false for failure + */ + bool MULTIMC_LOGIC_EXPORT extractFile(QString fileCompressed, QString file, QString dir); + } |