FileSystemWatcher

  • Thread starter Thread starter AMP
  • Start date Start date
A

AMP

Hello,
I have been using the FileSystemWatcher successfully, but I'd like to
know more about how its implemented.
There is no information in the class description about how or how
often the pinging is taking place.
The directory I am monitoring is on a seperate computer on the
network.
Thanks,
Mike
 
Hello,
I have been using the FileSystemWatcher successfully, but I'd like to
know more about how its implemented.
There is no information in the class description about how or how
often the pinging is taking place.
The directory I am monitoring is on a seperate computer on the
network.
Thanks,
Mike

Hi,

It does not use a "pinging" mechanism, it use events provided by the
NTFS. You have to look into the NTFS docs to know which events are
available and how to use them
 
AMP said:
Hello,
I have been using the FileSystemWatcher successfully, but I'd like to
know more about how its implemented.
There is no information in the class description about how or how
often the pinging is taking place.
The directory I am monitoring is on a seperate computer on the
network.

There is no pinging or polling. FileSystemWatcher is using features of the
NTFS file system.
 
There is no pinging or polling.  FileSystemWatcher is using features ofthe
NTFS file system.

How does it know something (A file change)is happening somewhere else
(Another Computer), if its not sending a request for information?
 
How does it know something (A file change)is happening somewhere else
(Another Computer), if its not sending a request for information?

Again, NTFS allow this. for example if the remote folder is not in
NTFS but in FAT you will nt be able to use it. As a test share a
removable device (that usually use FAT) and see what happens
 
How does it know something (A file change)is happening somewhere else
(Another Computer), if its not sending a request for information?

Under the covers, FileSystemWatcher is calling the ReadDirectoryChangesW
function (part of Kernel32.dll). The function doesn't complete until
something in the directory changes.
 
Back
Top