There is some network resource and you need it if it became unavailable to do something.

How correctly to use FileSystemWatcher and what are the possible pitfalls?

In this object, I pass the path to the network ball, track renaming (As I understood in my case, don't care what to track), and subscribe to the Error event.

How can you find out that the ball has become available again?

  • I will probably be beaten, but why not just try to periodically send a blank text file to the ball on a timer? So immediately and the availability and availability of rights can be checked, and consider that there is no traffic. - rdorn
  • FileSystemWatcher can be used (the main thing is not to run into security problems). Better yet, pre-mount the folder to the disk using NET USE specifying a user and password immediately, if necessary, and then insert this disk - Sublihim

0