KAr

KDE 4.2 PyKDE API Reference

- KDE's Python API

# KAr Class Reference

`from PyKDE4.kio import *`

Inherits: KArchive

## Detailed Description

KAr is a class for reading archives in ar format. Writing is not supported. A class for reading ar archives.

Author:
  Laurence Anderson <l.d.anderson@warwick.ac.uk>

## Methods
| __init__ (self, QString filename)
| __init__ (self, QIODevice dev)
| __init__ (self, KAr other)
bool | closeArchive (self)
bool | doFinishWriting (self, long size)
bool | doPrepareWriting (self, QString name, QString user, QString group, long size, mode_t perm, time_t atime, time_t mtime, time_t ctime)
bool | doWriteDir (self, QString name, QString user, QString group, mode_t perm, time_t atime, time_t mtime, time_t ctime)
bool | doWriteSymLink (self, QString name, QString target, QString user, QString group, mode_t perm, time_t atime, time_t mtime, time_t ctime)
bool | openArchive (self, QIODevice.OpenMode mode)
| virtual_hook (self, int id, void data)

## Method Documentation

__init__ | ( | self, |
|  | QString | filename
| ) |  |  |

Creates an instance that operates on the given filename.

Parameters:

  | filename | is a local path (e.g. "/home/holger/myfile.ar")

__init__ | ( | self, |
|  | QIODevice | dev
| ) |  |  |

Creates an instance that operates on the given device. The device can be compressed (KFilterDev) or not (QFile, etc.).

Parameters:

  | dev | the device to read from

__init__ | ( | self, |
|  | KAr | other
| ) |  |  |

bool closeArchive | ( |  | self ) |

bool doFinishWriting | ( | self, |
|  | long | size
| ) |  |  |

bool doPrepareWriting | ( | self, |
|  | QString | name,
|  | QString | user,
|  | QString | group,
|  | long | size,
|  | mode_t | perm,
|  | time_t | atime,
|  | time_t | mtime,
|  | time_t | ctime
| ) |  |  |

bool doWriteDir | ( | self, |
|  | QString | name,
|  | QString | user,
|  | QString | group,
|  | mode_t | perm,
|  | time_t | atime,
|  | time_t | mtime,
|  | time_t | ctime
| ) |  |  |

bool doWriteSymLink | ( | self, |
|  | QString | name,
|  | QString | target,
|  | QString | user,
|  | QString | group,
|  | mode_t | perm,
|  | time_t | atime,
|  | time_t | mtime,
|  | time_t | ctime
| ) |  |  |

bool openArchive | ( | self, |
|  | QIODevice.OpenMode | mode
| ) |  |  |

Opens the archive for reading. Parses the directory listing of the archive and creates the KArchiveDirectory/KArchiveFile entries.

virtual_hook | ( | self, |
|  | int | id,
|  | void | data
| ) |  |  |