MythTV  master
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
UnZip Class Reference

#include <libmythbase/unzip2.h>

Classes

struct  zipEntry
 

Public Member Functions

 UnZip (QString zipFile)
 
 ~UnZip ()
 
bool extractFile (const QString &outDir)
 

Private Member Functions

bool isValid ()
 
bool getEntryStats (zipEntry &entry)
 
void getEntryAttrs (zipEntry &entry)
 
bool zipValidateFilename (const QFileInfo &fi)
 
bool zipCreateSymlink (const zipEntry &entry)
 
bool zipWriteOneFile (const zipEntry &entry)
 

Static Private Member Functions

static QFileDevice::Permissions zipToQtPerms (const zipEntry &entry)
 
static bool zipCreateDirectory (const zipEntry &entry)
 
static void zipSetFileAttributes (const zipEntry &entry, QFile &outfile)
 

Private Attributes

QDir m_outDir
 
QString m_zipFileName
 
zip_t * m_zip {nullptr}
 
zip_int64_t m_zipFileCount {-1}
 

Static Private Attributes

static constexpr uint64_t kSTATS_REQUIRED {ZIP_STAT_NAME|ZIP_STAT_INDEX|ZIP_STAT_SIZE|ZIP_STAT_MTIME|ZIP_STAT_ENCRYPTION_METHOD}
 

Detailed Description

Definition at line 29 of file unzip2.h.

Constructor & Destructor Documentation

◆ UnZip()

UnZip::UnZip ( QString  zipFile)
explicit

Definition at line 38 of file unzip2.cpp.

◆ ~UnZip()

UnZip::~UnZip ( )

Definition at line 51 of file unzip2.cpp.

Member Function Documentation

◆ extractFile()

bool UnZip::extractFile ( const QString &  outDir)

Definition at line 264 of file unzip2.cpp.

Referenced by extractZIP().

◆ isValid()

bool UnZip::isValid ( )
inlineprivate

Definition at line 48 of file unzip2.h.

Referenced by extractFile().

◆ getEntryStats()

bool UnZip::getEntryStats ( zipEntry entry)
private

Definition at line 62 of file unzip2.cpp.

Referenced by extractFile().

◆ getEntryAttrs()

void UnZip::getEntryAttrs ( zipEntry entry)
private

Definition at line 82 of file unzip2.cpp.

Referenced by extractFile().

◆ zipToQtPerms()

QFileDevice::Permissions UnZip::zipToQtPerms ( const zipEntry entry)
staticprivate

Definition at line 118 of file unzip2.cpp.

Referenced by zipSetFileAttributes().

◆ zipCreateDirectory()

bool UnZip::zipCreateDirectory ( const zipEntry entry)
staticprivate

Definition at line 91 of file unzip2.cpp.

Referenced by extractFile().

◆ zipValidateFilename()

bool UnZip::zipValidateFilename ( const QFileInfo &  fi)
private

Definition at line 107 of file unzip2.cpp.

Referenced by extractFile(), and zipCreateSymlink().

◆ zipSetFileAttributes()

void UnZip::zipSetFileAttributes ( const zipEntry entry,
QFile &  outfile 
)
staticprivate

Definition at line 148 of file unzip2.cpp.

Referenced by zipWriteOneFile().

◆ zipCreateSymlink()

bool UnZip::zipCreateSymlink ( const zipEntry entry)
private

Definition at line 163 of file unzip2.cpp.

Referenced by extractFile().

◆ zipWriteOneFile()

bool UnZip::zipWriteOneFile ( const zipEntry entry)
private

Definition at line 201 of file unzip2.cpp.

Referenced by extractFile().

Member Data Documentation

◆ kSTATS_REQUIRED

constexpr uint64_t UnZip::kSTATS_REQUIRED {ZIP_STAT_NAME|ZIP_STAT_INDEX|ZIP_STAT_SIZE|ZIP_STAT_MTIME|ZIP_STAT_ENCRYPTION_METHOD}
staticconstexprprivate

Definition at line 32 of file unzip2.h.

Referenced by getEntryStats().

◆ m_outDir

QDir UnZip::m_outDir
private

Definition at line 58 of file unzip2.h.

Referenced by extractFile(), and zipValidateFilename().

◆ m_zipFileName

QString UnZip::m_zipFileName
private

Definition at line 61 of file unzip2.h.

Referenced by extractFile(), getEntryStats(), UnZip(), zipCreateSymlink(), zipWriteOneFile(), and ~UnZip().

◆ m_zip

zip_t* UnZip::m_zip {nullptr}
private

◆ m_zipFileCount

zip_int64_t UnZip::m_zipFileCount {-1}
private

Definition at line 63 of file unzip2.h.

Referenced by extractFile().


The documentation for this class was generated from the following files: