ckb-next  v0.2.8 at branch master
ckb-next driver for corsair devices
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JlCompress.h
Go to the documentation of this file.
1 #ifndef JLCOMPRESSFOLDER_H_
2 #define JLCOMPRESSFOLDER_H_
3 
4 /*
5 Copyright (C) 2010 Roberto Pompermaier
6 Copyright (C) 2005-2014 Sergey A. Tachenov
7 
8 This file is part of QuaZIP.
9 
10 QuaZIP is free software: you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation, either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 QuaZIP is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with QuaZIP. If not, see <http://www.gnu.org/licenses/>.
22 
23 See COPYING file for the full LGPL text.
24 
25 Original ZIP package is copyrighted by Gilles Vollant and contributors,
26 see quazip/(un)zip.h files for details. Basically it's the zlib license.
27 */
28 
29 #include "quazip.h"
30 #include "quazipfile.h"
31 #include "quazipfileinfo.h"
32 #include <QString>
33 #include <QDir>
34 #include <QFileInfo>
35 #include <QFile>
36 
38 
43 private:
45 
51  static bool compressFile(QuaZip* zip, QString fileName, QString fileDest);
53 
62  static bool compressSubDir(QuaZip* parentZip, QString dir, QString parentDir, bool recursive = true);
64 
70  static bool extractFile(QuaZip* zip, QString fileName, QString fileDest);
72 
76  static bool removeFile(QStringList listFile);
77 
78 public:
80 
85  static bool compressFile(QString fileCompressed, QString file);
87 
92  static bool compressFiles(QString fileCompressed, QStringList files);
94 
101  static bool compressDir(QString fileCompressed, QString dir = QString(), bool recursive = true);
102 
103 public:
105 
112  static QString extractFile(QString fileCompressed, QString fileName, QString fileDest = QString());
114 
121  static QStringList extractFiles(QString fileCompressed, QStringList files, QString dir = QString());
123 
129  static QStringList extractDir(QString fileCompressed, QString dir = QString());
131 
136  static QStringList getFileList(QString fileCompressed);
137 };
138 
139 #endif /* JLCOMPRESSFOLDER_H_ */
ZIP archive.
Definition: quazip.h:84
#define QUAZIP_EXPORT
This is automatically defined when building a static library, but when including QuaZip sources direc...
Definition: quazip_global.h:46
Utility class for typical operations.
Definition: JlCompress.h:42