# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KArchiveEntry Class Reference

A base class for entries in an KArchive. Base class for the archive-file's directory structure. More...

`#include <karchive.h>`

Inheritance diagram for KArchiveEntry:

[legend]
Collaboration diagram for KArchiveEntry:

[legend]
List of all members.

## Public Member Functions

| 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
virtual bool | isDirectory () const

## Protected Member Functions

KArchive * | archive () const
virtual void | virtual_hook (int id, void *data)

## Detailed Description

A base class for entries in an KArchive. Base class for the archive-file's directory structure.

See also:
  KArchiveFile

  KArchiveDirectory

Definition at line 384 of file karchive.h.

## Constructor & Destructor Documentation

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

Creates a new 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 437 of file karchive.cpp.

References group(), name(), symlink(), and user().

## Member Function Documentation

QDateTime KArchiveEntry::datetime | ( |  | ) | const

Creation date of the file.

Returns:
  the creation date

Definition at line 451 of file karchive.cpp.

References QDateTime::setTime_t().

int KArchiveEntry::date | ( |  | ) | const`[inline]`

Creation date of the file.

Returns:
  the creation date in seconds since 1970

Definition at line 413 of file karchive.h.

QString KArchiveEntry::name | ( |  | ) | const`[inline]`

Name of the file without path.

Returns:
  the file name without path

Definition at line 419 of file karchive.h.

Referenced by KArchiveDirectory::copyTo(), KArchiveFile::copyTo(), and KArchiveEntry().

mode_t KArchiveEntry::permissions | ( |  | ) | const`[inline]`

The permissions and mode flags as returned by the stat() function in st_mode.

Returns:
  the permissions

Definition at line 425 of file karchive.h.

QString KArchiveEntry::user | ( |  | ) | const`[inline]`

User who created the file.

Returns:
  the owner of the file

Definition at line 430 of file karchive.h.

Referenced by KArchiveEntry().

QString KArchiveEntry::group | ( |  | ) | const`[inline]`

Group of the user who created the file.

Returns:
  the group of the file

Definition at line 435 of file karchive.h.

Referenced by KArchiveEntry().

QString KArchiveEntry::symlink | ( |  | ) | const`[inline]`

Symlink if there is one.

Returns:
  the symlink, or QString::null

Definition at line 441 of file karchive.h.

Referenced by KArchiveEntry().

virtual bool KArchiveEntry::isFile | ( |  | ) | const`[inline, virtual]`

Checks whether the entry is a file.

Returns:
  true if this entry is a file

Reimplemented in KArchiveFile.

Definition at line 447 of file karchive.h.

Referenced by KArchiveDirectory::copyTo().

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

Checks whether the entry is a directory.

Returns:
  true if this entry is a directory

Reimplemented in KArchiveDirectory.

Definition at line 453 of file karchive.h.

Referenced by KArchiveDirectory::copyTo(), KArchiveDirectory::entry(), KArchive::findOrCreate(), and KZip::openArchive().

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

- karchive.h
- karchive.cpp

This file is part of the documentation for kio Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:24:13 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003