Get detailed information on FileSystemEventArgs.ChangeType

Posted by case23 on Stack Overflow See other posts from Stack Overflow or by case23
Published on 2010-04-17T23:56:02Z Indexed on 2010/04/18 0:03 UTC
Read the original article Hit count: 210

Filed under:

I using the FileWatcher Class to locate changes on Files in a specific Folder.

I managed to detect Changes on Files but not detailed Information.

On the WatcherChangeTypes Enumeration Page

http://msdn.microsoft.com/en-us/library/t6xf43e0%28v=VS.100%29.aspx

they write the Change Type detects the changes include: changes to size, attributes, security settings, last write, and last access time.

Is there a way to detect which kind of change happened?

Thats the Event handler method i use.

private void OnChanged(object source, FileSystemEventArgs e)
{
     Console.WriteLine("File: " + e.FullPath + " Change Type: " + e.ChangeType);

}

Thank you in advance

Case

© Stack Overflow or respective owner

Related posts about c#