File Filters

Index of All Documentation » Wing Pro Reference Manual » Customization »

Wing allows you to define file filters that can be used in various ways within the IDE, such as for searching particular batches of files and adding only certain kinds of files to a project.

To view or alter the defined file filters, use File Filters in the Files > File Types preferences group.

When adding or editing a filter, the following information may be entered:

  • Name -- The name of 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 Filename -- The specification in this case is a wildcard that must match the file name. The wildcards supported are those provided by Python's fnmatch module.
  • 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 Extra File Types preference to define them.

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

Any problems encountered in using the file filters are reported in the Messages area.