JlCompress.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef JLCOMPRESSFOLDER_H_
  2. #define JLCOMPRESSFOLDER_H_
  3. #include "quazip.h"
  4. #include "quazipfile.h"
  5. #include "quazipfileinfo.h"
  6. #include <QString>
  7. #include <QDir>
  8. #include <QFileInfo>
  9. #include <QFile>
  10. class QUAZIP_EXPORT JlCompress {
  11. private:
  12. static bool compressFile(QuaZip* zip, QString fileName, QString fileDest);
  13. static bool compressSubDir(QuaZip* parentZip, QString dir, QString parentDir, bool recursive = true);
  14. static bool extractFile(QuaZip* zip, QString fileName, QString fileDest);
  15. static bool removeFile(QStringList listFile);
  16. public:
  17. static bool compressFile(QString fileCompressed, QString file);
  18. static bool compressFiles(QString fileCompressed, QStringList files);
  19. static bool compressDir(QString fileCompressed, QString dir = QString(), bool recursive = true);
  20. public:
  21. static QString extractFile(QString fileCompressed, QString file, QString fileDest = QString());
  22. static QStringList extractFiles(QString fileCompressed, QStringList files, QString dir = QString());
  23. static QStringList extractDir(QString fileCompressed, QString dir = QString());
  24. static QStringList getFileList(QString fileCompressed);
  25. };
  26. #endif /* JLCOMPRESSFOLDER_H_ */