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?
FileSystemWatchercan be used (the main thing is not to run into security problems). Better yet, pre-mount the folder to the disk usingNET USEspecifying a user and password immediately, if necessary, and then insert this disk - Sublihim