Search code examples
c#wpffilesystemwatcher

Can FileSystemWatcher work OFFLINE?


I have written an application that needs to monitor changes to a synchronized offline folder while the user is not connected to the network. I have used the FileSystemWatcher and it works beautifully while the user is connected to the network, however as soon as they are in an offline state the FileSystemWatcher ceases to receive any events.

I can't find any documentation regarding file system events in offline folders, does anyone have any experience in this space?

Thanks


Solution

  • http://www.codeproject.com/Articles/15656/Advanced-FileSystemWatcher

    • two new public events: NetworkPathAvailable and NetworkPathUnavailable. In code, the user will look in these events to determine if the network path is available, and the code can take the appropriate measures to continue working, or die gracefully.*