Search code examples
c#.netfilesystemwatcher

C# FileSystemWatcher and it's selected directory's own changes


So I have a filesystemwatcher that notifies me of changes all under the selected folder but I noticed that if I delete or rename the folder that is being watches, it is not detected. How would you detect if the watched folder is renamed or deleted?


Solution

  • "notifies me of changes all under the selected folder"

    Watch the folder above. Maybe even have 2 watchers.