About FileSystemWatcher !!

  • Thread starter Thread starter MingChih Tsai
  • Start date Start date
M

MingChih Tsai

Hi there,

I can use FileSystemWatcher class to monitor system io, but how should I do
if I want to cancel the system delete process on my OnDelete event ?

Thanks for the reply !!

Regards,
Paul
 
Paul,

You can't do this with the FileSystemWatcher, as Watchers never
interfere (it's a comic book reference). Seriously though, the
FileSystemWatcher doesn't have the abilty to cancel out actions that you
observe.

The only way to really cancel this is to write a system level driver,
which is something you can not do in .NET.

You will have to use unmanaged code if you want to do something like
that.

Hope this helps.
 
Back
Top