Find out username(who) modified file in C#
问题 I am using a FileSystemWatcher to monitor a folder. But when there is some event happening in the directory, I don\'t know how to search who made a impact on that file. I tried to use EventLog. It just couldn\'t work. Is there another way to do it? 回答1: I cant remember where I found this code but its an alternative to using pInvoke which I think is a bit overkill for this task. Use the FileSystemWatcher to watch the folder and when an event fires you can work out which user made the file