QuaZip quazip-1-6
QuaExtract.h
1#ifndef QUAEXTRACT_H
2#define QUAEXTRACT_H
3
4/*
5Copyright (C) 2025 cen1
6
7This file is part of QuaZip.
8
9QuaZip is free software: you can redistribute it and/or modify
10it under the terms of the GNU Lesser General Public License as published by
11the Free Software Foundation, either version 2.1 of the License, or
12(at your option) any later version.
13
14QuaZip is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License
20along with QuaZip. If not, see <http://www.gnu.org/licenses/>.
21
22See COPYING file for the full LGPL text.
23*/
24
25#include <QtCore/QString>
26#include <QtCore/QStringList>
27
28#include "quazip_global.h"
29#include "quazip_textcodec.h"
30
31class QIODevice;
32
43class QUAZIP_EXPORT QuaExtract {
44public:
46 QuaExtract();
47
49
53 QuaExtract& withPassword(const QByteArray& password);
54
55 // ==================== Extraction Methods ====================
56
58
64 QString extractFile(const QString& archive, const QString& fileName, const QString& fileDest = QString()) const;
65
67
73 QStringList extractFiles(const QString& archive, const QStringList& files = QStringList(),
74 const QString& dir = QString()) const;
75
77
82 QStringList extractDir(const QString& archive, const QString& dir = QString()) const;
83
85
91 QStringList extractDir(const QString& archive, QuazipTextCodec* fileNameCodec, const QString& dir = QString()) const;
92
93 // ==================== Extraction from QIODevice ====================
94
96
102 QStringList extractFiles(QIODevice* ioDevice, const QStringList& files = QStringList(),
103 const QString& dir = QString()) const;
104
106
111 QStringList extractDir(QIODevice* ioDevice, const QString& dir = QString()) const;
112
114
120 QStringList extractDir(QIODevice* ioDevice, QuazipTextCodec* fileNameCodec, const QString& dir = QString()) const;
121
122 // ==================== Information Methods ====================
123
125
129 QStringList getFileList(const QString& archive) const;
130
132
136 QStringList getFileList(QIODevice* ioDevice) const;
137
138private:
139 QByteArray m_password;
140};
141
142#endif // QUAEXTRACT_H
Definition QuaExtract.h:43
Definition quazip_textcodec.h:39