KArchiveDirectory Class Reference

`#include <karchive.h>`

Inheritance diagram for KArchiveDirectory:

## 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
Public Member Functions inherited from KArchiveEntry
| KArchiveEntry (KArchive *archive, const QString &name, int access, int date, const QString &user, const QString &group, const QString &symlink)
QDateTime | datetime () const
int | date () const
QString | name () const
mode_t | permissions () const
QString | user () const
QString | group () const
QString | symlink () const
virtual bool | isFile () const

## Protected Member Functions

virtual void | virtual_hook (int id, void *data)
Protected Member Functions inherited from KArchiveEntry
KArchive * | archive () const

## Detailed Description

Represents a directory entry in a KArchive.

A directory in an archive.

See also
  KArchive
  KArchiveFile

Definition at line 573 of file karchive.h.

## Constructor & Destructor Documentation

KArchiveDirectory::KArchiveDirectory | ( | KArchive * | archive,
|  | const QString & | name,
|  | int | access,
|  | int | date,
|  | const QString & | user,
|  | const QString & | group,
|  | const QString & | symlink
| ) |  |

Creates a new directory entry.

Parameters

  archive | the entries archive
  name | the name of the entry
  access | the permissions in unix format
  date | the date (in seconds since 1970)
  user | the user that owns the entry
  group | the group that owns the entry
  symlink | the symlink, or QString::null

Definition at line 527 of file karchive.cpp.

## Member Function Documentation

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

Extracts all entries in this archive directory to the directory `dest`.

Parameters

  dest | the directory to extract to
  recursive | if set to true, subdirectories are extracted as well

Since
  3.1

Definition at line 599 of file karchive.cpp.

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

Returns a list of sub-entries.

Returns
  the names of all entries in this directory (filenames, no path).

Definition at line 536 of file karchive.cpp.

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

Returns the entry with the given name.

Parameters

  name | may be "test1", "mydir/test3", "mydir/mysubdir/test3", etc.

Returns
  a pointer to the entry in the directory.

Definition at line 547 of file karchive.cpp.

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

Returns the entry with the given name.

Parameters

  name | may be "test1", "mydir/test3", "mydir/mysubdir/test3", etc.

Returns
  a pointer to the entry in the directory.

Definition at line 584 of file karchive.cpp.

virtual bool KArchiveDirectory::isDirectory | ( |  | ) | const

inline virtual

Checks whether this entry is a directory.

Returns
  true, since this entry is a directory

Reimplemented from KArchiveEntry.

Definition at line 620 of file karchive.h.

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

- karchive.h
- karchive.cpp

KDE Home | KDE Accessibility Home | Description of Access Keys