# class KSimpleFileFilter

###

Table of contents
Modules
kio Classes
All Classes

Module | kio
Namespace | global
Class | KSimpleFileFilter
Inherits | KFileFilter

A simple file filter that can filter hidden dot files, by name, by mime type and by mode. A simple file filter.

### methods

- KSimpleFileFilter ()

  returns a KSimpleFileFilter object

  Creates a new filter. By default, it filters only hidden dot files and "." and "..".

- filterDotFiles ()

  returns (bool)

  Checks whether filtering dot files is enabled. This option is enabled by default. Returns true if filtering is enabled, false otherwise

  See also setFilterDotFiles

- filterSpecials ()

  returns (bool)

  Checks whether it filters "." and "..", default is true. Returns true if enabled, false otherwise

- mimeFilters ()

  returns (QStringList)

  Returns the list of mime types. Returns the list of mime types

  See also mimeFilter

- modeFilter ()

  returns (mode_t)

  Returns the mode filter, as set by setModeFilter(). Returns the mode filter, 0 if disabled

  See also setModeFilter

- passesFilter (item)

  returns (bool)

  Argument | Type | Default
  --- | --- | ---
  item | KFileItem |

  Checks the given item.

  item - the item to filter Returns true if the item passes the filter, false otherwise

- setFilterDotFiles (filter)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  filter | bool |

  Enable or disable filtering hidden dot files. This option is enabled by default.

  filter - true to enable filtering dot files, false to disable

  See also filterDotFiles

- setFilterSpecials (filter)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  filter | bool |

  Filters "." and "..", default is true.

  filter - true to enable, false otherwise

- setMimeFilters (mimeFilters)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  mimeFilters | QStringList |

  Sets a list of mime filters. A file can only pass if its mime type is contained in this list.

  mimeFilters - the list of mime types

  See also setMimeFilter

- setModeFilter (mode)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  mode | mode_t |

  Sets the mode filter. If the mode is 0, the filter is disabled. When enabled, a file will only pass if the files mode ANDed with mode is not zero.

  mode - the new mode. 0 to disable

  See also modeFilter

- setNameFilters (nameFilters, caseSensitive)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  nameFilters | QStringList |
  caseSensitive | Qt.CaseSensitivity | Qt.CaseSensitive

  Sets a list of regular expressions to filter by name. The file will only pass if its name matches one of the regular expressions. The regular expressions are using wildcard matching.

  nameFilters - a list of regular expressions

  caseSensitive - Qt.CaseSensitive or Qt.CaseInsensitive