Initializes a new instance of the FileSystemWatcher class.
[Visual Basic] Overloads Public Sub New() [C#] public FileSystemWatcher(); [C++] public: FileSystemWatcher(); [JScript] public function FileSystemWatcher();
Note The component will not begin watching the specified directory until the Path is set.
You cannot watch a remote computer that does not have Windows NT or Windows 2000. You cannot watch a remote Windows NT 4.0 computer from a Windows NT 4.0 computer.
When an instance of FileSystemWatcher is created, the following read/write properties are set to initial values.
Property | Initial Value |
---|---|
ChangedFilter | LastWrite |
Enabled | false |
Filter | "*.*" (watch all files) |
IncludeSubdirectories | false |
InternalBufferSize | 8192 |
Path | empty string ("") |
Target | Both |
You can change the value for any of these properties through a separate call to the property.
FileSystemWatcher Class | FileSystemWatcher Members | System.IO Namespace | FileSystemWatcher Constructor Overload List | ChangedFilters | FileSystemEventArgs | FileSystemEventHandler | InternalBufferOverflowException | Path | RenamedEventArgs | RenamedEventHandler | WaitForChangedResult | WatcherChangeTypes | WatcherTarget