views:

136

answers:

1

For example, I can catch the Delete event for various files in a folder tree, but how would I go about determining which user caused the delete to happen?

I couldn't find anything obvious in the MSDN documentation for FileSystemWatcher, so maybe it is just not possible. I'd be curious if there is a solution however.

+2  A: 

This isn't currently possible with the current implementations of the FileSystemWatcher as it does not receive this type of information when a file is deleted, or anything about a file changes.

Scott Dorman
Do you know if this is possible at all in a .NET application? Or would I need to delve into the Win API?
Ash
@Ash: You would need to use Win32 API calls, if it's possible at all. I'm not sure which APIs you would need to use, but you will end up essentially writing your own version of a file system watcher.
Scott Dorman