KDE 4.7 PyKDE API Reference

- KDE's Python API

# KArchiveDirectory Class Reference

`from PyKDE4.kio import *`

Inherits: KArchiveEntry

## Detailed Description

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

See also:
  KArchive

See also:
  KArchiveFile

## Methods

| __init__ (self, KArchive archive, QString name, int access, int date, QString user, QString group, QString symlink)
| __init__ (self, KArchiveDirectory other)
| addEntry (self, KArchiveEntry a0)
| copyTo (self, QString dest, bool recursive=1)
QStringList | entries (self)
KArchiveEntry | entry (self, QString name)
bool | isDirectory (self)

## Method Documentation

__init__ | ( | self, |
|  | KArchive | archive,
|  | QString | name,
|  | int | access,
|  | int | date,
|  | QString | user,
|  | QString | group,
|  | QString | symlink
| ) |  |  |

Creates a new directory entry.

Parameters:

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

__init__ | ( | self, |
|  | KArchiveDirectory | other
| ) |  |  |

addEntry | ( | self, |
|  | KArchiveEntry | a0
| ) |  |  |

Internal:
  Adds a new entry to the directory.

copyTo | ( | self, |
|  | QString | dest,
|  | bool | recursive=1
| ) |  |  |

Extracts all entries in this archive directory to the directory dest.

Parameters:

  | dest | the directory to extract to
  | recursive | if set to true, subdirectories are extracted as well

QStringList entries | ( |  | self ) |

Returns a list of sub-entries. Note that the list is not sorted, it's even in random order (due to using a hashtable). Use sort() on the result to sort the list by filename.

Returns:
  the names of all entries in this directory (filenames, no path).

KArchiveEntry entry | ( | self, |
|  | QString | name
| ) |  |  |

Returns the entry with the given name.

Parameters:

  | name | may be "test1", "mydir/test3", "mydir/mysubdir/test3", etc.

Returns:
  a pointer to the entry in the directory.

bool isDirectory | ( |  | self ) |

Checks whether this entry is a directory.

Returns:
  true, since this entry is a directory