kio Library API Documentation

KArchiveDirectory Class Reference

Represents a directory entry in a KArchive. A directory in an archive. More...

#include <karchive.h>

Inheritance diagram for KArchiveDirectory:

KArchiveEntry List of all members.

Public Methods

 KArchiveDirectory (KArchive *archive, const QString &name, int access, int date, const QString &user, const QString &group, const QString &symlink)
QStringList entries () const
KArchiveEntryentry (QString name)
const KArchiveEntryentry (QString name) const
virtual bool isDirectory () const
void copyTo (const QString &dest, bool recursive=true) const

Protected Methods

virtual void virtual_hook (int id, void *data)

Detailed Description

Represents a directory entry in a KArchive. A directory in an archive.

See also:
KArchive , KArchiveFile

Definition at line 560 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 517 of file karchive.cpp.

References QDict< KArchiveEntry >::setAutoDelete(), and KIO::symlink().


Member Function Documentation

QStringList KArchiveDirectory::entries  
 

Returns a list of sub-entries.

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

Definition at line 526 of file karchive.cpp.

References QDictIterator::current(), and QDictIterator::currentKey().

Referenced by copyTo().

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 537 of file karchive.cpp.

References QString::find(), KArchiveEntry::isDirectory(), QString::left(), QString::length(), and QString::mid().

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

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 574 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 607 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.

Parameters:
dest  the directory to extract to
Since:
3.1

Definition at line 585 of file karchive.cpp.

References QPtrList< KArchiveFile >::append(), KArchiveFile::copyTo(), entries(), entry(), QPtrList< KArchiveFile >::first(), QMap::insert(), KArchiveEntry::isDirectory(), QPtrStack::isEmpty(), KArchiveEntry::isFile(), QDir::mkdir(), KArchiveEntry::name(), QPtrList< KArchiveFile >::next(), QValueStack::pop(), QPtrStack::pop(), KArchiveFile::position(), QValueStack::push(), QPtrStack::push(), and QPtrList< KArchiveFile >::sort().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.2.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 4 12:35:10 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003