• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KIO

KAr Class Reference

KAr is a class for reading archives in ar format. More...

#include <kar.h>

Inheritance diagram for KAr:

Inheritance graph
[legend]

List of all members.


Public Member Functions

 KAr (QIODevice *dev)
 KAr (const QString &filename)
virtual ~KAr ()

Protected Member Functions

virtual bool closeArchive ()
virtual bool doFinishWriting (qint64 size)
virtual bool doPrepareWriting (const QString &name, const QString &user, const QString &group, qint64 size, mode_t perm, time_t atime, time_t mtime, time_t ctime)
virtual bool doWriteDir (const QString &name, const QString &user, const QString &group, mode_t perm, time_t atime, time_t mtime, time_t ctime)
virtual bool doWriteSymLink (const QString &name, const QString &target, const QString &user, const QString &group, mode_t perm, time_t atime, time_t mtime, time_t ctime)
virtual bool openArchive (QIODevice::OpenMode mode)
virtual void virtual_hook (int id, void *data)

Detailed Description

KAr is a class for reading archives in ar format.

Writing is not supported. A class for reading ar archives.

Author:
Laurence Anderson <l.d.anderson@warwick.ac.uk>

Definition at line 29 of file kar.h.


Constructor & Destructor Documentation

KAr::KAr ( const QString &  filename  ) 

Creates an instance that operates on the given filename.

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

Definition at line 42 of file kar.cpp.

KAr::KAr ( QIODevice *  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

Definition at line 47 of file kar.cpp.

KAr::~KAr (  )  [virtual]

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

Definition at line 52 of file kar.cpp.


Member Function Documentation

bool KAr::closeArchive (  )  [protected, virtual]

Closes the archive.

Called by close.

Implements KArchive.

Definition at line 175 of file kar.cpp.

bool KAr::doFinishWriting ( qint64  size  )  [protected, virtual]

Called after writing the data.

This virtual method must be implemented by subclasses.

Parameters:
size the size of the file
See also:
finishWriting()

Implements KArchive.

Definition at line 65 of file kar.cpp.

bool KAr::doPrepareWriting ( const QString &  name,
const QString &  user,
const QString &  group,
qint64  size,
mode_t  perm,
time_t  atime,
time_t  mtime,
time_t  ctime 
) [protected, virtual]

This virtual method must be implemented by subclasses.

Depending on the archive type not all metadata might be used.

Parameters:
name the name of the file
user the user that owns the file
group the group that owns the file
size the size of the file
perm permissions of the file. Use 0100644 if you don't have any more specific permissions to set.
atime time the file was last accessed
mtime modification time of the file
ctime time of last status change
See also:
prepareWriting

Implements KArchive.

Definition at line 59 of file kar.cpp.

bool KAr::doWriteDir ( const QString &  name,
const QString &  user,
const QString &  group,
mode_t  perm,
time_t  atime,
time_t  mtime,
time_t  ctime 
) [protected, virtual]

Write a directory to the archive.

This virtual method must be implemented by subclasses.

Depending on the archive type not all metadata might be used.

Parameters:
name the name of the directory
user the user that owns the directory
group the group that owns the directory
perm permissions of the directory. Use 040755 if you don't have any other information.
atime time the file was last accessed
mtime modification time of the file
ctime time of last status change
See also:
writeDir

Implements KArchive.

Definition at line 70 of file kar.cpp.

bool KAr::doWriteSymLink ( const QString &  name,
const QString &  target,
const QString &  user,
const QString &  group,
mode_t  perm,
time_t  atime,
time_t  mtime,
time_t  ctime 
) [protected, virtual]

Writes a symbolic link to the archive.

This virtual method must be implemented by subclasses.

Parameters:
name name of symbolic link
target target of symbolic link
user the user that owns the directory
group the group that owns the directory
perm permissions of the directory
atime time the file was last accessed
mtime modification time of the file
ctime time of last status change
See also:
writeSymLink

Implements KArchive.

Definition at line 76 of file kar.cpp.

bool KAr::openArchive ( QIODevice::OpenMode  mode  )  [protected, virtual]

Opens the archive for reading.

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

Implements KArchive.

Definition at line 82 of file kar.cpp.

void KAr::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented from KArchive.

Definition at line 181 of file kar.cpp.


The documentation for this class was generated from the following files:
  • kar.h
  • kar.cpp

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal