Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Is there any advantage in using a FileSystemWatcher as against a timer polling a folder?
I know the code is sweeter, but is it faster, more efficient etc?
Posted
Comments
Nelek 18-Apr-12 16:44pm    
Stuart, check the solution 1, someone posted a link in a comment after yours, but he didn't answered you, so I guess you didn't get the notification.
Philippe Mori 18-Apr-12 22:59pm    
Using a timer does not make much sense in general... If you uses a small delay then you might make the hard drive works too much and drain the battery (of a laptop).

Hi,
Take a look at this post which covers advantages/disadvantages of FileSystemWatcher class :
http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/d0022f19-451d-46fb-b59c-a7e298048c34[^]

I hope it helps,
Cheers
 
Share this answer
 
Comments
Stuart Nathan 18-Apr-12 13:03pm    
Had a good look at this link, but it doesn't seem to address the advantages or disadvantages, despite saying so in its intro. Perhaps I misunderstood it. Can you help?
Reza Ahmadi 18-Apr-12 13:15pm    
In this link search the 'limitation' key word:
http://www.codeproject.com/Articles/15656/Advanced-FileSystemWatcher
I hope it helps
I still haven't got a definitive answer, so I wrote my own. It doesn't check file rename, but it does everything else.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900