This object represents a filter. A filter is a named collection of patterns, each one of which will match a file system item depending on its type and name.
Properties
Countread-onlyIFilter
The number of patterns in the collection.
IDL |
[propget] HRESULT Count([out, retval] long* pValue)
|
---|---|
.NET | Int32 Count[get] |
Itemread-onlyIFilter
Used to obtain a copy of one of the filter’s patterns.
IDL |
[propget] HRESULT Item(
|
---|---|
.NET | FilterPattern
get_Item( |
index
An integer index into the collection.
Nameread/writeIFilter
The name of the filter.
IDL |
[propget] HRESULT Name([out, retval] BSTR* pValue)
|
---|---|
.NET | String Name[get, set] |
Methods
AddIFilter
Adds a copy of the specified pattern to the collection.
IDL |
HRESULT Add(
|
---|---|
.NET | Int32 Add( |
pattern
The pattern to add to the collection.
InitializeFromExcludePatternIFilter
Creates a list of exclude patterns for the filter from the string argument. The string can consist of any number of semicolon-separated patterns. Each pattern can optionally be wildcarded. Patterns ending in a back-slash character are assumed to match folders instead of files.For example, providing: *.obj;*.exe;Debug\;Release\
will cause five patterns to be added to the filter. The first pattern will cause all files and folders to be included, the second and third will then exclude files ending in .obj
and .exe
, and the fourth and fifth will exclude folders called Debug
or Release
.
IDL |
HRESULT InitializeFromExcludePattern(
|
---|---|
.NET | void InitializeFromExcludePattern( |
pattern
The pattern string that is to be used to create the patterns within the filter.
InitializeFromIncludePatternIFilter
Creates a list of include patterns for the filter from the string argument. The string can consist of any number of semicolon-separated patterns. Each pattern can optionally be wildcarded. Patterns ending in a back-slash character are assumed to match folders instead of files.For example, providing: *.gif;*.wav;Images\;Sounds\
will cause four patterns to be added to the filter. The first and second patterns will include files ending in .gif
and .wav
, and the third and fourth will include folders called Images
and Sounds
.
IDL |
HRESULT InitializeFromIncludePattern(
|
---|---|
.NET | void InitializeFromIncludePattern( |
pattern
The pattern string that is to be used to create the patterns within the filter.
RemoveIFilter
Removes the pattern at the specified index in the collection.
IDL |
HRESULT Remove(
|
---|---|
.NET | void Remove( |
index
The index of the pattern to be removed.
RepositionPatternIFilter
Moves a pattern from one index to another in the collection.
IDL |
HRESULT RepositionPattern(
|
---|---|
.NET | void RepositionPattern( |
oldIndex
The index of the pattern to be moved.newIndex
The index to which the pattern should be moved.