<type>documentation</type>
<domain>custom</domain>
<id>file-filters</id>
<title>File Filters</title>
<date>$Date: 2007-09-24 23:16:39 -0400 (Mon, 24 Sep 2007) $</date>
<version>$Revision: 16483 $</version>
<product>per+</product>

The `Files > File Types > File Filters <script:show_preferences_gui#prefname="main.file-filters">`__ 
preference allows you to define filters that constrain file selection for the project and searching.
When adding or editing a filter, the following information may be entered:

* **Name** -- The display name for the filter

* **Includes** -- A list of inclusion criteria, each of which contains a
  type and a specification.  A file will be included by the filter if
  any one of these include criteria matches the file.

* **Excludes** -- A list of exclusion criteria, any of which can match to 
  cause a file to be excluded by the filter even if one or more includes
  also matched.

The following types of include and exclude criteria are supported:

* **Wildcard on File Name** -- The specification in this case is a wildcard
  that must match the file name.  The wildcards supported are ``*`` to
  match any string, ``?`` to many any single character, ``[seq]`` to
  match any character in a sequence, and ``[!seq]`` to match
  any character not in a sequence.  Sequences may be a list of characters
  or a range specifier such as ``a-z`` or ``0-9``.  If the specification
  contains no wildcard characters, it is treated as a file extension.
  
* **Wildcard on Directory Name** -- The specification in this case is a wildcard
  that must match the directory name.
  
* **Mime Type** -- The specification in this case names a MIME type
  supported by Wing.  If additional file extensions need to be mapped
  to a MIME type, use the `Files > File Types > Extra File Types`__ preference 
  to define them.

__ script:show_preferences_gui#prefname="main.extra-mime-types"

Once defined, filters are presented by name in the `Search in Files`__ tool's 
``Filter`` menu, and in the `Project`__ tool's ``Directory Properties``.

__ script:show-panel-batch-search
__ script:show-panel-project

Any problems encountered in using the file filters are reported in the `Messages
<script:show-panel-messages>`__ tool.
