KDE 4.7 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, long perm, long atime, long mtime, long ctime)
bool | doWriteDir (self, QString name, QString user, QString group, long perm, long atime, long mtime, long ctime)
bool | doWriteSymLink (self, QString name, QString target, QString user, QString group, long perm, long atime, long mtime, long ctime)
bool | openArchive (self, QIODevice::OpenMode mode)

## 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,
|  | long | perm,
|  | long | atime,
|  | long | mtime,
|  | long | ctime
| ) |  |  |

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

bool doWriteSymLink | ( | self, |
|  | QString | name,
|  | QString | target,
|  | QString | user,
|  | QString | group,
|  | long | perm,
|  | long | atime,
|  | long | mtime,
|  | long | 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.