CreateFileExtension

DocumentFilter.CreateFileExtension method

Creates a filter for skipping documents that do not have an allowable extension.

public static DocumentFilter CreateFileExtension(params string[] extensions)
Parameter Type Description
extensions String[] The list of allowable extensions.

Return Value

A document filter by document extension.

Remarks

An extension, with or without the leading dot, is compared with the end of the file name after a dot, ignoring the case of the letters: “doc” and “.doc” match “a.doc” and “a.DOC”, but neither “mydoc” nor “a.xdoc”; an extension of several parts, such as “tar.gz”, matches “a.tar.gz”. An empty extension matches a file name without an extension.

See Also