.TH "KArchiveFile" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KArchiveFile \- A file in an archive.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <karchive.h>\fP
.PP
Inherits \fBKArchiveEntry\fP.
.PP
Inherited by KZipFileEntry.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKArchiveFile\fP (\fBKArchive\fP *archive, const  \fBQString\fP &name, int access, int date, const  \fBQString\fP &user, const  \fBQString\fP &group, const  \fBQString\fP &symlink, int pos, int size)"
.br
.ti -1c
.RI "int \fBposition\fP () const "
.br
.RI "\fIPosition of the data in the [uncompressed] archive. \fP"
.ti -1c
.RI "int \fBsize\fP () const "
.br
.RI "\fISize of the data. \fP"
.ti -1c
.RI "void \fBsetSize\fP (int s)"
.br
.RI "\fISet size of data, usually after writing the file. \fP"
.ti -1c
.RI "virtual \fBQByteArray\fP \fBdata\fP () const "
.br
.ti -1c
.RI "\fBQIODevice\fP * \fBdevice\fP () const "
.br
.RI "\fIThis method returns \fBQIODevice\fP (internal class: \fBKLimitedIODevice\fP) on top of the underlying \fBQIODevice\fP. \fP"
.ti -1c
.RI "virtual bool \fBisFile\fP () const "
.br
.ti -1c
.RI "void \fBcopyTo\fP (const  \fBQString\fP &dest) const "
.br
.RI "\fIExtracts the file to the directory \fCdest\fP 
.PP
\fBSince:\fP
.RS 4
3.1. 
.RE
.PP
\fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
A file in an archive. 

\fBSee also:\fP
.RS 4
\fBKArchive\fP 
.PP
\fBKArchiveDirectory\fP 
.RE
.PP

.PP
Definition at line 243 of file karchive.h.
.SH "Member Function Documentation"
.PP 
.SS "int KArchiveFile::position () const"
.PP
Position of the data in the [uncompressed] archive. Definition at line 262 of file karchive.cpp.
.PP
Referenced by KArchiveDirectory::copyTo().
.SS "int KArchiveFile::size () const"
.PP
Size of the data. Definition at line 267 of file karchive.cpp.
.SS "void KArchiveFile::setSize (int s)\fC [inline]\fP"
.PP
Set size of data, usually after writing the file. Definition at line 263 of file karchive.h.
.SS "\fBQByteArray\fP KArchiveFile::data () const\fC [virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
the content of this file. Call \fBdata()\fP with care (only once per file), this data isn't cached. 
.RE
.PP
Definition at line 272 of file karchive.cpp.
.PP
References QIODevice::at(), KArchive::device(), and QIODevice::readBlock().
.PP
Referenced by copyTo().
.SS "\fBQIODevice\fP * KArchiveFile::device () const"
.PP
This method returns \fBQIODevice\fP (internal class: \fBKLimitedIODevice\fP) on top of the underlying \fBQIODevice\fP. This is obviously for reading only. 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. Definition at line 289 of file karchive.cpp.
.SS "virtual bool KArchiveFile::isFile () const\fC [inline, virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
true, since this entry is a file 
.RE
.PP
Reimplemented from \fBKArchiveEntry\fP.
.PP
Definition at line 283 of file karchive.h.
.SS "void KArchiveFile::copyTo (const \fBQString\fP & dest) const"
.PP
Extracts the file to the directory \fCdest\fP 
.PP
\fBSince:\fP
.RS 4
3.1. 
.RE
.PP
Definition at line 294 of file karchive.cpp.
.PP
References QFile::close(), data(), KArchiveEntry::name(), and QFile::open().
.PP
Referenced by KArchiveDirectory::copyTo().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
