#include <ktar.h>
Inheritance diagram for KTar:

Public Methods | |
| KTar (const QString &filename, const QString &mimetype=QString::null) | |
| KTar (QIODevice *dev) | |
| virtual | ~KTar () |
| QString | fileName () |
| void | setOrigFileName (const QCString &fileName) |
| virtual bool | writeDir (const QString &name, const QString &user, const QString &group) |
| virtual bool | prepareWriting (const QString &name, const QString &user, const QString &group, uint size) |
| virtual bool | doneWriting (uint size) |
Protected Methods | |
| virtual bool | openArchive (int mode) |
| virtual bool | closeArchive () |
| virtual void | virtual_hook (int id, void *data) |
Definition at line 35 of file ktar.h.
|
||||||||||||
|
Creates an instance that operates on the given filename. using the compression filter associated to given mimetype.
|
|
|
Creates an instance that operates on the given device. The device can be compressed (KFilterDev) or not (QFile, etc.). WARNING: don't assume that giving a QFile here will decompress the file, in case it's compressed! |
|
|
If the tar ball is still opened, then it will be closed automatically by the destructor. |
|
|
Closes the archive. Called by close. Implements KArchive. |
|
|
Call doneWriting after writing the data.
Implements KArchive. |
|
|
The name of the tar file, as passed to the constructor Null if you used the QIODevice constructor. |
|
|
Opens the archive for reading. Parses the directory listing of the archive and creates the KArchiveDirectory/KArchiveFile entries. Implements KArchive. |
|
||||||||||||||||||||
|
Here's another way of writing a file into an archive: Call prepareWriting, then call device()->writeBlock() (for tar files) or writeData (for zip files) [NEW VIRTUAL METHOD NEEDED] as many times as wanted then call doneWriting( totalSize ) For tar.gz files, you need to know the size before hand, it is needed in the header! For zip files, size isn't used. Implements KArchive. |
|
|
Special function for setting the "original file name" in the gzip header, when writing a tar.gz file. It appears when using in the "file" command, for instance. Should only be called if the underlying device is a KFilterDev! |
|
||||||||||||||||
|
If an archive is opened for writing then you can add new directories using this function. KArchive won't write one directory twice. Implements KArchive. |
1.2.18