| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KArchiveDirectory Class Reference

A directory in an archive. More...

`#include <karchive.h>`

Inheritance diagram for KArchiveDirectory:

[legend]
Collaboration diagram for KArchiveDirectory:

[legend]
List of all members.

## Public Member Functions
| KArchiveDirectory (KArchive *archive, const QString &name, int access, int date, const QString &user, const QString &group, const QString &symlink)
QStringList | entries () const
KArchiveEntry * | entry (QString name)
const KArchiveEntry * | entry (QString name) const
void | addEntry (KArchiveEntry *)
virtual bool | isDirectory () const
void | copyTo (const QString &dest, bool recursive=true) const
| Extracts all entries in this archive directory to the directory `dest`.
## Protected Member Functions
virtual void | virtual_hook (int id, void *data)

## Detailed Description

A directory in an archive.

See also:
  KArchive

  KArchiveFile

Definition at line 306 of file karchive.h.

## Member Function Documentation

QStringList KArchiveDirectory::entries | ( |  | ) | const

| Returns: the names of all entries in this directory (filenames, no path). Definition at line 316 of file karchive.cpp. References QDictIterator::current(), and QDictIterator::currentKey(). Referenced by copyTo().

KArchiveEntry * KArchiveDirectory::entry | ( | QString | name | ) |

  | Returns: a pointer to the entry in the directory. Parameters:
  name | may be "test1", "mydir/test3", "mydir/mysubdir/test3", etc.
Definition at line 327 of file karchive.cpp. References QString::find(), KArchiveEntry::isDirectory(), QString::left(), QString::length(), QString::mid(), and KStdAccel::name(). Referenced by copyTo(), KArchive::findOrCreate(), and KZip::openArchive().

virtual bool KArchiveDirectory::isDirectory | ( |  | ) | const`[inline, virtual]`

| Returns: true, since this entry is a directory Reimplemented from KArchiveEntry. Definition at line 336 of file karchive.h.

void KArchiveDirectory::copyTo | ( | const QString & | dest,
|  | bool | recursive = true
| ) | const

| Extracts all entries in this archive directory to the directory `dest`. If `recursive` is true, subdirectories are extracted as well. Since: 3.1 Definition at line 375 of file karchive.cpp. References KArchiveFile::copyTo(), entries(), entry(), QMap::insert(), KArchiveEntry::isDirectory(), QPtrStack::isEmpty(), KArchiveEntry::isFile(), QDir::mkdir(), KArchiveEntry::name(), QValueStack::pop(), QPtrStack::pop(), KArchiveFile::position(), QValueStack::push(), and QPtrStack::push().

The documentation for this class was generated from the following files:

- karchive.h
- karchive.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:14:58 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001