K7Zip

Search for usage in LXR

#include <K7Zip>

Inheritance diagram for K7Zip:

Public Member Functions

 K7Zip (const QString &filename)
 
 K7Zip (QIODevice *dev)
 
 ~K7Zip () override
 
- 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 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() [1/2]

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 552 of file k7zip.cpp.

◆ K7Zip() [2/2]

K7Zip::K7Zip ( QIODevice dev)
explicit

Creates an instance that operates on the given device.

The device can be compressed (KCompressionDevice) 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 558 of file k7zip.cpp.

◆ ~K7Zip()

K7Zip::~K7Zip ( )
override

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

Definition at line 565 of file k7zip.cpp.

Member Function Documentation

◆ closeArchive()

bool K7Zip::closeArchive ( )
overrideprotectedvirtual

Closes the archive.

Called by close.

Implements KArchive.

Definition at line 2729 of file k7zip.cpp.

◆ doFinishWriting()

bool K7Zip::doFinishWriting ( qint64  size)
overrideprotectedvirtual

Reimplemented from KArchive.

Implements KArchive.

Definition at line 2859 of file k7zip.cpp.

◆ doPrepareWriting()

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 2884 of file k7zip.cpp.

◆ doWriteDir()

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 2935 of file k7zip.cpp.

◆ doWriteSymLink()

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 2976 of file k7zip.cpp.

◆ openArchive()

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 2310 of file k7zip.cpp.

◆ writeData()

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

Reimplemented from KArchive.

Reimplemented from KArchive.

Definition at line 2867 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-2023 The KDE developers.
Generated on Fri Jun 9 2023 04:04:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.