org.kde.koala

Class KAr

public class KAr extends KArchive

KAr is a class for reading archives in ar format. Writing is not supported.

Author: Laurence Anderson

UNKNOWN: A class for reading ar archives.

Constructor Summary
protected KAr(Class dummy)
KAr(String filename)
Creates an instance that operates on the given filename.
KAr(QIODeviceInterface dev)
Creates an instance that operates on the given device.
Method Summary
protected booleancloseArchive()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
booleandoneWriting(int size)
StringfileName()
The name of the ar file, as passed to the constructor.
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
protected booleanopenArchive(int mode)
Opens the archive for reading.
booleanprepareWriting(String name, String user, String group, int size)
booleanwriteDir(String name, String user, String group)

Constructor Detail

KAr

protected KAr(Class dummy)

KAr

public KAr(String filename)
Creates an instance that operates on the given filename.

Parameters: filename is a local path (e.g. "/home/holger/myfile.ar")

UNKNOWN: Creates an instance that operates on the given filename.

KAr

public KAr(QIODeviceInterface dev)
Creates an instance that operates on the given device. The device can be compressed (KFilterDev) or not (QFile, etc.).

Parameters: dev the device to read from

UNKNOWN: Creates an instance that operates on the given device.

Method Detail

closeArchive

protected boolean closeArchive()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

doneWriting

public boolean doneWriting(int size)

fileName

public String fileName()
The name of the ar file, as passed to the constructor.

Returns: the filename. Null if you used the QIODevice constructor

UNKNOWN: The name of the ar file, as passed to the constructor.

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

openArchive

protected boolean openArchive(int mode)
Opens the archive for reading. Parses the directory listing of the archive and creates the KArchiveDirectory/KArchiveFile entries.

UNKNOWN: Opens the archive for reading.

prepareWriting

public boolean prepareWriting(String name, String user, String group, int size)

writeDir

public boolean writeDir(String name, String user, String group)