KDE 4.9 PyKDE API Reference

- KDE's Python API

# KFileMetaInfo Class Reference

`from PyKDE4.kio import *`

## Detailed Description

KFileMetaInfo provides metadata extracted from a file or other resource.

When instantiating an instance of this class, the metadata related to it will be retrieved and stored in the instance. The data can be inspected through KFileMetaInfoItem objects.

## Enumerations

What | { Fastest, TechnicalInfo, ContentInfo, ExternalSources, Thumbnail, LinkedData, Everything }

## Methods

| __init__ (self, QString path, QString mimetype=QString(), KFileMetaInfo.WhatFlags w=KFileMetaInfo.Everything)
| __init__ (self, KUrl url)
| __init__ (self)
| __init__ (self, KFileMetaInfo a0)
bool | applyChanges (self)
bool | isValid (self)
KFileMetaInfoItem | item (self, QString key)
{QString:KFileMetaInfoItem} | items (self)
QStringList | keys (self)
QStringList | preferredKeys (self)
QStringList | supportedKeys (self)
KUrl | url (self)

## Method Documentation

__init__ | ( | self, |
|  | QString | path,
|  | QString | mimetype=QString(),
|  | KFileMetaInfo.WhatFlags | w=KFileMetaInfo.Everything
| ) |  |  |

Construct a KFileMetaInfo that contains metainformation about the resource pointed to by path.

When w is not Everything, a limit of 64kbytes is imposed on the file size.

__init__ | ( | self, |
|  | KUrl | url
| ) |  |  |

Construct a KFileMetaInfo that contains metainformation about the resource pointed to by url.

Note:
  that c'tor is not thread-safe

__init__ | ( |  | self ) |

Construct a KFileMetaInfo instance from another one.

__init__ | ( | self, |
|  | KFileMetaInfo | a0
| ) |  |  |

Construct a KFileMetaInfo instance from another one.

bool applyChanges | ( |  | self ) |

Save the changes made to this KFileMetaInfo instance.

bool isValid | ( |  | self ) |

KFileMetaInfoItem item | ( | self, |
|  | QString | key
| ) |  |  |

{QString:KFileMetaInfoItem} items | ( |  | self ) |

Retrieve all the items.

QStringList keys | ( |  | self ) |

QStringList preferredKeys | ( |  | self ) |

Deprecated

QStringList supportedKeys | ( |  | self ) |

Deprecated

KUrl url | ( |  | self ) |

## Enumeration Documentation

What

This is used to specify what a KFileMetaInfo object should read, so you can specify if you want to read "expensive" items or not. This is like a preset which can be customized by passing additional parameters to constructors.

Enumerator:

  Fastest = 0x1 |
  TechnicalInfo = 0x4 |
  ContentInfo = 0x8 |
  ExternalSources = 0x10 |
  Thumbnail = 0x20 |
  LinkedData = 0x80 |
  Everything = 0xffff |