May 10, 2010 at 3:02am UTC
so i am trying to get to make a program to tell me when a folder has been accessed could i use:
FILE_NOTIFY_CHANGE_LAST_ACCESS
will the last access time change when its opened or closed?
May 10, 2010 at 9:07pm UTC
From MSDN:
Any change to the last access time of files in the watched directory or subtree causes a change notification wait operation to return.
So, FILE_NOTIFY_CHANGE_LAST_ACCESS will give you the last time it was accessed, whether the file was opened or closed at that time.
http://msdn.microsoft.com/en-us/library/aa365465%28VS.85%29.aspx
Last edited on May 10, 2010 at 9:13pm UTC
May 10, 2010 at 10:52pm UTC
well i was thinking that the file time of last access would be changed right when its opened signaling that it just opened.
May 11, 2010 at 12:10am UTC
According to MSDN, ANY time the file is accessed, the time of the flag will be changed. So, yes, the time will change when the file is opened.