K7Zip

#include <K7Zip>

Inheritance diagram for K7Zip:

Public Member Functions

 K7Zip (const QString &filename)
 
 K7Zip (QIODevice *dev)
 
virtual ~K7Zip ()
 
- Public Member Functions inherited from KArchive
bool addLocalDirectory (const QString &path, const QString &destName)
 
bool addLocalFile (const QString &fileName, const QString &destName)
 
virtual bool close ()
 
QIODevicedevice () const
 
const KArchiveDirectorydirectory () const
 
QString errorString () const
 
QString fileName () const
 
bool finishWriting (qint64 size)
 
bool isOpen () const
 
QIODevice::OpenMode mode () const
 
virtual bool open (QIODevice::OpenMode mode)
 
bool prepareWriting (const QString &name, const QString &user, const QString &group, qint64 size, mode_t perm=0100644, const QDateTime &atime=QDateTime(), const QDateTime &mtime=QDateTime(), const QDateTime &ctime=QDateTime())
 
bool writeDir (const QString &name, const QString &user=QString(), const QString &group=QString(), mode_t perm=040755, const QDateTime &atime=QDateTime(), const QDateTime &mtime=QDateTime(), const QDateTime &ctime=QDateTime())
 
bool writeFile (const QString &name, const QString &user, const QString &group, const char *data, qint64 size, mode_t perm=0100644, const QDateTime &atime=QDateTime(), const QDateTime &mtime=QDateTime(), const QDateTime &ctime=QDateTime())
 
bool writeFile (const QString &name, const QByteArray &data, mode_t perm=0100644, const QString &user=QString(), const QString &group=QString(), const QDateTime &atime=QDateTime(), const QDateTime &mtime=QDateTime(), const QDateTime &ctime=QDateTime())
 
bool writeSymLink (const QString &name, const QString &target, const QString &user=QString(), const QString &group=QString(), mode_t perm=0120755, const QDateTime &atime=QDateTime(), const QDateTime &mtime=QDateTime(), const QDateTime &ctime=QDateTime())
 

Protected Member Functions

bool closeArchive () override
 
bool doFinishWriting (qint64 size) override
 
bool doPrepareWriting (const QString &name, const QString &user, const QString &group, qint64 size, mode_t perm, const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) override
 
bool doWriteDir (const QString &name, const QString &user, const QString &group, mode_t perm, const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) override
 
bool doWriteSymLink (const QString &name, const QString &target, const QString &user, const QString &group, mode_t perm, const QDateTime &atime, const QDateTime &mtime, const QDateTime &ctime) override
 
bool openArchive (QIODevice::OpenMode mode) override
 
void virtual_hook (int id, void *data) override
 
bool writeData (const char *data, qint64 size) override
 
- Protected Member Functions inherited from KArchive
 KArchive (const QString &fileName)
 
 KArchive (QIODevice *dev)
 
virtual bool createDevice (QIODevice::OpenMode mode)
 
KArchiveDirectoryfindOrCreate (const QString &path)
 
virtual KArchiveDirectoryrootDir ()
 
void setDevice (QIODevice *dev)
 
void setErrorString (const QString &errorStr)
 
void setRootDir (KArchiveDirectory *rootDir)
 

Detailed Description

A class for reading / writing p7zip archives.

Author
Mario Bensi

Definition at line 18 of file k7zip.h.

Constructor & Destructor Documentation

K7Zip::K7Zip ( const QString filename)
explicit

Creates an instance that operates on the given filename using the compression filter associated to given mimetype.

Parameters
filenameis a local path (e.g. "/home/user/myfile.7z")

Definition at line 522 of file k7zip.cpp.

K7Zip::K7Zip ( QIODevice dev)
explicit

Creates an instance that operates on the given device.

The device can be compressed (KFilterDev) or not (QFile, etc.).

Warning
Do not assume that giving a QFile here will decompress the file, in case it's compressed!
Parameters
devthe device to read from. If the source is compressed, the QIODevice must take care of decompression

Definition at line 528 of file k7zip.cpp.

K7Zip::~K7Zip ( )
virtual

If the archive is still opened, then it will be closed automatically by the destructor.

Definition at line 535 of file k7zip.cpp.

Member Function Documentation

bool K7Zip::closeArchive ( )
overrideprotectedvirtual

Closes the archive.

Called by close.

Implements KArchive.

Definition at line 2709 of file k7zip.cpp.

bool K7Zip::doFinishWriting ( qint64  size)
overrideprotectedvirtual

Reimplemented from KArchive.

Implements KArchive.

Definition at line 2839 of file k7zip.cpp.

bool K7Zip::doPrepareWriting ( const QString name,
const QString user,
const QString group,
qint64  size,
mode_t  perm,
const QDateTime atime,
const QDateTime mtime,
const QDateTime ctime 
)
overrideprotectedvirtual

Reimplemented from KArchive.

Implements KArchive.

Definition at line 2865 of file k7zip.cpp.

bool K7Zip::doWriteDir ( const QString name,
const QString user,
const QString group,
mode_t  perm,
const QDateTime atime,
const QDateTime mtime,
const QDateTime ctime 
)
overrideprotectedvirtual

Reimplemented from KArchive.

Implements KArchive.

Definition at line 2909 of file k7zip.cpp.

bool K7Zip::doWriteSymLink ( const QString name,
const QString target,
const QString user,
const QString group,
mode_t  perm,
const QDateTime atime,
const QDateTime mtime,
const QDateTime ctime 
)
overrideprotectedvirtual

Reimplemented from KArchive.

Implements KArchive.

Definition at line 2946 of file k7zip.cpp.

bool K7Zip::openArchive ( QIODevice::OpenMode  mode)
overrideprotectedvirtual

Opens the archive for reading.

Parses the directory listing of the archive and creates the KArchiveDirectory/KArchiveFile entries.

Parameters
modethe mode of the file

Implements KArchive.

Definition at line 2296 of file k7zip.cpp.

bool K7Zip::writeData ( const char *  data,
qint64  size 
)
overrideprotectedvirtual

Reimplemented from KArchive.

Reimplemented from KArchive.

Definition at line 2848 of file k7zip.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 23:03:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.