• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KDECore

Public Member Functions | Protected Member Functions

KArchiveFile Class Reference

Represents a file entry in a KArchive. More...

#include <karchive.h>

Inheritance diagram for KArchiveFile:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 KArchiveFile (KArchive *archive, const QString &name, int access, int date, const QString &user, const QString &group, const QString &symlink, qint64 pos, qint64 size)
virtual ~KArchiveFile ()
void copyTo (const QString &dest) const
virtual QIODevice * createDevice () const
virtual QByteArray data () const
virtual bool isFile () const
qint64 position () const
void setSize (qint64 s)
qint64 size () const

Protected Member Functions

virtual void virtual_hook (int id, void *data)

Detailed Description

Represents a file entry in a KArchive.

A file in an archive.

See also:
KArchive
KArchiveDirectory

Definition at line 457 of file karchive.h.


Constructor & Destructor Documentation

KArchiveFile::KArchiveFile ( KArchive *  archive,
const QString &  name,
int  access,
int  date,
const QString &  user,
const QString &  group,
const QString &  symlink,
qint64  pos,
qint64  size 
)

Creates a new file entry.

Do not call this, KArchive takes care of it.

Parameters:
archivethe entries archive
namethe name of the entry
accessthe permissions in unix format
datethe date (in seconds since 1970)
userthe user that owns the entry
groupthe group that owns the entry
symlinkthe symlink, or QString()
posthe position of the file in the directory
sizethe size of the file

Definition at line 606 of file karchive.cpp.

KArchiveFile::~KArchiveFile ( ) [virtual]

Destructor.

Do not call this, KArchive takes care of it.

Definition at line 615 of file karchive.cpp.


Member Function Documentation

void KArchiveFile::copyTo ( const QString &  dest) const

Extracts the file to the directory dest.

Parameters:
destthe directory to extract to

Definition at line 662 of file karchive.cpp.

QIODevice * KArchiveFile::createDevice ( ) const [virtual]

This method returns QIODevice (internal class: KLimitedIODevice) on top of the underlying QIODevice.

This is obviously for reading only.

WARNING: Note that the ownership of the device is being transferred to the caller, who will have to delete it.

The returned device auto-opens (in readonly mode), no need to open it.

Returns:
the QIODevice of the file

Reimplemented in KZipFileEntry.

Definition at line 652 of file karchive.cpp.

QByteArray KArchiveFile::data ( ) const [virtual]

Returns the data of the file.

Call data() with care (only once per file), this data isn't cached.

Returns:
the content of this file.

Reimplemented in KZipFileEntry.

Definition at line 635 of file karchive.cpp.

bool KArchiveFile::isFile ( ) const [virtual]

Checks whether this entry is a file.

Returns:
true, since this entry is a file

Reimplemented from KArchiveEntry.

Definition at line 657 of file karchive.cpp.

qint64 KArchiveFile::position ( ) const

Position of the data in the [uncompressed] archive.

Returns:
the position of the file

Definition at line 620 of file karchive.cpp.

void KArchiveFile::setSize ( qint64  s)

Set size of data, usually after writing the file.

Parameters:
sthe new size of the file

Definition at line 630 of file karchive.cpp.

qint64 KArchiveFile::size ( ) const

Size of the data.

Returns:
the size of the file

Definition at line 625 of file karchive.cpp.

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

Reimplemented from KArchiveEntry.

Definition at line 844 of file karchive.cpp.


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

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • 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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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