• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

Public Member Functions | Protected Member Functions
KArchiveFile Class Reference

#include <karchive.h>

Inheritance diagram for KArchiveFile:
KArchiveEntry

List of all members.

Public Member Functions

 KArchiveFile (KArchive *archive, const TQString &name, int access, int date, const TQString &user, const TQString &group, const TQString &symlink, int pos, int size)
int position () const
int size () const
void setSize (int s)
virtual TQByteArray data () const
TQIODevice * device () const
virtual bool isFile () const
void copyTo (const TQString &dest) 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 490 of file karchive.h.


Constructor & Destructor Documentation

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

Creates a new file entry.

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 TQString::null
posthe position of the file in the directory
sizethe size of the file

Definition at line 472 of file karchive.cpp.


Member Function Documentation

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

Extracts the file to the directory dest.

Parameters:
destthe directory to extract to
Since:
3.1

Definition at line 514 of file karchive.cpp.

TQByteArray 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.

Definition at line 492 of file karchive.cpp.

TQIODevice * KArchiveFile::device ( ) const

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

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.

Returns:
the TQIODevice of the file

Definition at line 509 of file karchive.cpp.

virtual bool KArchiveFile::isFile ( ) const [inline, virtual]

Checks whether this entry is a file.

Returns:
true, since this entry is a file

Reimplemented from KArchiveEntry.

Definition at line 548 of file karchive.h.

int KArchiveFile::position ( ) const

Position of the data in the [uncompressed] archive.

Returns:
the position of the file

Definition at line 482 of file karchive.cpp.

void KArchiveFile::setSize ( int  s) [inline]

Set size of data, usually after writing the file.

Parameters:
sthe new size of the file

Definition at line 525 of file karchive.h.

int KArchiveFile::size ( ) const

Size of the data.

Returns:
the size of the file

Definition at line 487 of file karchive.cpp.


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

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.