NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

FileSystemWatcher.Filter

Gets or sets the filter string, used to determine what files are monitored in a directory.

[Visual Basic]
Overridable Public Property Filter As String
[C#]
public string Filter {virtual get; virtual set;}
[C++]
public: __property virtual String* get_Filter();
public: __property virtual void set_Filter(String*);
[JScript]
public function get Filter() : String;
public function set Filter(String);

Property Value

The filter string. The default is "*.*" (all files).

Remarks

To watch for changes in all files, set the Filter property to "*.*". To watch a specific file, set the Filter property to the file name. For example, if you want to watch for any changes in the file MyDoc.txt, set the Filter property to "MyDoc.txt". You can also watch for changes in a certain type of file. For example, to watch for changes in any text files, set the Filter property to "*.txt".

The Filter applies to change notifications after they have gone through the buffer and does not limit what goes into the buffer. For more information on filtering out unwanted notifications before recording them in the buffer, see the ChangedFilter, IncludeSubdirectories, InternalBufferSize, and Target properties.

See Also

FileSystemWatcher Class | FileSystemWatcher Members | System.IO Namespace | ChangedFilter | IncludeSubdirectories | InternalBufferSize | Target