winapi access flags

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?
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
well i was thinking that the file time of last access would be changed right when its opened signaling that it just opened.
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.
sweet thanks
Topic archived. No new replies allowed.