KDE 4.4 PyKDE API Reference

- KDE's Python API

# FileQuery Class Reference

`from PyKDE4.nepomuk import *`

Inherits: Nepomuk.Query.Query
Namespace: Nepomuk.Query.FileQuery

## Detailed Description

\class FileQuery filequery.h Nepomuk/Query/FileQuery

A Nepomuk desktop query specialized for file searches.

FileQuery is an extension to Query which adds some syntactic sugar for dealing with file queries. This includes a restriction of the results to files and the possibility to restrict the search to specific folders via setIncludeFolders() and setExcludeFolders().

Author:
  Sebastian Trueg <trueg@kde.org>

Since:
  4.4

## Methods
| __init__ (self)
| __init__ (self, Nepomuk.Query.Query query)
| addExcludeFolder (self, KUrl folder)
| addIncludeFolder (self, KUrl folder)
KUrl.List | excludeFolders (self)
KUrl.List | includeFolders (self)
| setExcludeFolders (self, KUrl.List folders)
| setIncludeFolders (self, KUrl.List folders)

## Method Documentation

__init__ | ( |  | self ) |

Create an empty invalid file query object.

__init__ | ( | self, |
|  | Nepomuk.Query.Query | query
| ) |  |  |

Copy constructor.

addExcludeFolder | ( | self, |
|  | KUrl | folder
| ) |  |  |

Add a folder to exclude from the search. If exclude folders are set the query will be restricted to files that are not in that folder and its subfolders.

Be aware that setting a folder filter will implicitely restrict the query to files and folders.

Parameters:

  | folder | The folder to exclude from the search.

\sa setExcludeFolders, excludeFolders, addIncludeFolder

addIncludeFolder | ( | self, |
|  | KUrl | folder
| ) |  |  |

Add a folder to include in the search. If include folders are set the query will be restricted to files from that folders and their subfolders.

Be aware that setting a folder filter will implicitely restrict the query to files and folders.

Parameters:

  | folder | The folder to include in the search.

\sa setIncludeFolders, includeFolders, addExcludeFolder

KUrl.List excludeFolders | ( |  | self ) |

The list of exclude folders set via addExcludeFolder() and setExcludeFolders().

\sa addExcludeFolder, setExcludeFolders, includeFolders

KUrl.List includeFolders | ( |  | self ) |

The list of include folders set via addIncludeFolder() and setIncludeFolders().

\sa addIncludeFolder, setIncludeFolders, excludeFolders

setExcludeFolders | ( | self, |
|  | KUrl.List | folders
| ) |  |  |

Parameters:

  | folders | The folders to exclude from the search.

\sa addExcludeFolder, excludeFolders, setIncludeFolders

setIncludeFolders | ( | self, |
|  | KUrl.List | folders
| ) |  |  |

Parameters:

  | folders | The folders to include in the search.

\sa addIncludeFolder, includeFolders, setExcludeFolders