KAr Class Reference
#include <kar.h>
Inheritance diagram for KAr:

Detailed Description
KAr is a class for reading archives in ar format.A class for reading ar archives.Writing is not supported.
- Author:
- Laurence Anderson <l.d.anderson@warwick.ac.uk>
- Since:
- 3.1
Definition at line 38 of file kar.h.
Public Member Functions | |
KAr (const QString &filename) | |
KAr (QIODevice *dev) | |
virtual | ~KAr () |
QString | fileName () |
virtual bool | prepareWriting (const QString &name, const QString &user, const QString &group, uint size) |
virtual bool | doneWriting (uint size) |
virtual bool | writeDir (const QString &name, const QString &user, const QString &group) |
Protected Member Functions | |
virtual bool | openArchive (int mode) |
virtual bool | closeArchive () |
virtual void | virtual_hook (int id, void *data) |
Constructor & Destructor Documentation
|
Creates an instance that operates on the given filename.
|
|
Creates an instance that operates on the given device. The device can be compressed (KFilterDev) or not (QFile, etc.).
|
|
If the ar file is still opened, then it will be closed automatically by the destructor.
|
Member Function Documentation
|
Closes the archive. Called by close. Implements KArchive. |
|
Call doneWriting after writing the data.
Implements KArchive. |
|
The name of the ar file, as passed to the 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 writeData() as many times as wanted then call doneWriting( totalSize ). For tar.gz files, you need to know the size before hand, since it is needed in the header. For zip files, size isn't used.
Implements KArchive. |
|
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. |
The documentation for this class was generated from the following files: