QuaZIP quazip-0-7-1
|
00001 #ifndef JLCOMPRESSFOLDER_H_ 00002 #define JLCOMPRESSFOLDER_H_ 00003 00004 /* 00005 Copyright (C) 2010 Roberto Pompermaier 00006 Copyright (C) 2005-2014 Sergey A. Tachenov 00007 00008 This file is part of QuaZIP. 00009 00010 QuaZIP is free software: you can redistribute it and/or modify 00011 it under the terms of the GNU Lesser General Public License as published by 00012 the Free Software Foundation, either version 2.1 of the License, or 00013 (at your option) any later version. 00014 00015 QuaZIP is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU Lesser General Public License for more details. 00019 00020 You should have received a copy of the GNU Lesser General Public License 00021 along with QuaZIP. If not, see <http://www.gnu.org/licenses/>. 00022 00023 See COPYING file for the full LGPL text. 00024 00025 Original ZIP package is copyrighted by Gilles Vollant and contributors, 00026 see quazip/(un)zip.h files for details. Basically it's the zlib license. 00027 */ 00028 00029 #include "quazip.h" 00030 #include "quazipfile.h" 00031 #include "quazipfileinfo.h" 00032 #include <QString> 00033 #include <QDir> 00034 #include <QFileInfo> 00035 #include <QFile> 00036 00038 00042 class QUAZIP_EXPORT JlCompress { 00043 private: 00045 00051 static bool compressFile(QuaZip* zip, QString fileName, QString fileDest); 00053 00062 static bool compressSubDir(QuaZip* parentZip, QString dir, QString parentDir, bool recursive = true); 00064 00070 static bool extractFile(QuaZip* zip, QString fileName, QString fileDest); 00072 00076 static bool removeFile(QStringList listFile); 00077 00078 public: 00080 00085 static bool compressFile(QString fileCompressed, QString file); 00087 00092 static bool compressFiles(QString fileCompressed, QStringList files); 00094 00101 static bool compressDir(QString fileCompressed, QString dir = QString(), bool recursive = true); 00102 00103 public: 00105 00112 static QString extractFile(QString fileCompressed, QString fileName, QString fileDest = QString()); 00114 00121 static QStringList extractFiles(QString fileCompressed, QStringList files, QString dir = QString()); 00123 00129 static QStringList extractDir(QString fileCompressed, QString dir = QString()); 00131 00136 static QStringList getFileList(QString fileCompressed); 00137 }; 00138 00139 #endif /* JLCOMPRESSFOLDER_H_ */