# class KArchiveFile

###

Module | kio
Namespace |
Class | KArchiveFile
Inherits | KArchiveEntry

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

See also KArchive

See also KArchiveDirectory

### methods

- KArchiveFile (archive, name, access, date, user, group, symlink, pos, size)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  archive | KArchive |
  name | QString |
  access | int |
  date | int |
  user | QString |
  group | QString |
  symlink | QString |
  pos | qint64 |
  size | qint64 |

  Creates a new file entry. Do not call this, KArchive takes care of it.

  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()

  pos - the position of the file in the directory

  size - the size of the file

- copyTo (dest)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  dest | QString |

  Extracts the file to the directory dest

  dest - the directory to extract to

- createDevice ( )

  returns QIODevice

  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

- data ( )

  returns QByteArray

  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.

- isFile ( )

  returns bool

  Checks whether this entry is a file. Returns true, since this entry is a file

- position ( )

  returns qint64

  Position of the data in the [uncompressed] archive. Returns the position of the file

- setSize (s)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  s | qint64 |

  Set size of data, usually after writing the file.

  s - the new size of the file

- size ( )

  returns qint64

  Size of the data. Returns the size of the file

- virtual_hook (id, data)

  returns Nothing
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  id | int |
  data | void |