.TH "KArchiveFile" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KArchiveFile \- Represents a file entry in a \fBKArchive\fP. 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
.ti -1c
.RI "int \fBsize\fP () const "
.br
.ti -1c
.RI "void \fBsetSize\fP (int s)"
.br
.ti -1c
.RI "virtual \fBQByteArray\fP \fBdata\fP () const "
.br
.ti -1c
.RI "\fBQIODevice\fP * \fBdevice\fP () const "
.br
.ti -1c
.RI "virtual bool \fBisFile\fP () const "
.br
.ti -1c
.RI "void \fBcopyTo\fP (const \fBQString\fP &dest) const "
.br
.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 
Represents a file entry in a \fBKArchive\fP. A file in an archive. 

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

.PP
Definition at line 479 of file karchive.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KArchiveFile::KArchiveFile (\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)"
.PP
Creates a new file entry. 
.PP
\fBParameters:\fP
.RS 4
\fIarchive\fP the entries archive 
.br
\fIname\fP the name of the entry 
.br
\fIaccess\fP the permissions in unix format 
.br
\fIdate\fP the date (in seconds since 1970) 
.br
\fIuser\fP the user that owns the entry 
.br
\fIgroup\fP the group that owns the entry 
.br
\fIsymlink\fP the symlink, or QString::null 
.br
\fIpos\fP the position of the file in the directory 
.br
\fIsize\fP the size of the file 
.RE
.PP

.PP
Definition at line 462 of file karchive.cpp.
.SH "Member Function Documentation"
.PP 
.SS "int KArchiveFile::position () const"
.PP
Position of the data in the [uncompressed] archive. 
.PP
\fBReturns:\fP
.RS 4
the position of the file 
.RE
.PP

.PP
Definition at line 472 of file karchive.cpp.
.PP
Referenced by KArchiveDirectory::copyTo().
.SS "int KArchiveFile::size () const"
.PP
Size of the data. 
.PP
\fBReturns:\fP
.RS 4
the size of the file 
.RE
.PP

.PP
Definition at line 477 of file karchive.cpp.
.SS "void KArchiveFile::setSize (int s)\fC [inline]\fP"
.PP
Set size of data, usually after writing the file. 
.PP
\fBParameters:\fP
.RS 4
\fIs\fP the new size of the file 
.RE
.PP

.PP
Definition at line 514 of file karchive.h.
.SS "\fBQByteArray\fP KArchiveFile::data () const\fC [virtual]\fP"
.PP
Returns the data of the file. 
.PP
Call \fBdata()\fP with care (only once per file), this data isn't cached. 
.PP
\fBReturns:\fP
.RS 4
the content of this file. 
.RE
.PP

.PP
Definition at line 482 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. 
.PP
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. 
.PP
\fBReturns:\fP
.RS 4
the \fBQIODevice\fP of the file 
.RE
.PP

.PP
Definition at line 499 of file karchive.cpp.
.SS "virtual bool KArchiveFile::isFile () const\fC [inline, virtual]\fP"
.PP
Checks whether this entry is a file. 
.PP
\fBReturns:\fP
.RS 4
true, since this entry is a file 
.RE
.PP

.PP
Reimplemented from \fBKArchiveEntry\fP.
.PP
Definition at line 537 of file karchive.h.
.SS "void KArchiveFile::copyTo (const \fBQString\fP & dest) const"
.PP
Extracts the file to the directory \fCdest\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIdest\fP the directory to extract to 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 504 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.
