FileSystemWatcher & OnDeleted action - file or folder was deleted?
Posted on 2004-10-07
In my .NET app I use 'FileSystemWatcher class' and his handlers - Changed, Created, Renamed and Deleted which return 'e.FullPath' value.
How to determine if 'e.FullPath' is 'file' or 'folder' in OnDeleted action?
I use simple test 'Directory.Exists(e.FullPath)' in OnChanged, OnCreated and OnRenamed actions. But in OnDeleted action I cannot pass this test because e.FullPath object was just deleted.