然而,真正的答案有点复杂.
NTFS技术上只需在目录中列出文件即可更新LastAccess Time.因此,只需打开文件所在的目录,就会触发该目录中所有文件的更新.
从Windows 7开始,有一个注册表项禁用此项以防止NTFS日志填满.默认值阻止NTFS在列出NTFS卷中的目录时更新每个文件和目录的最后访问时间戳:https://technet.microsoft.com/en-us/library/cc959914.aspx
这些系统中的不同文件系统和不同指标也具有不同的时间分辨率:
Not all file systems can record creation and last access times,and not all file systems record them in the same manner. For example,the resolution of create time on FAT is 10 milliseconds,while write time has a resolution of 2 seconds and access time has a resolution of 1 day,so it is really the access date. The NTFS file system delays updates to the last access time for a file by up to 1 hour after the last access.
有关详细信息,请参见此处:http://msdn.microsoft.com/en-us/library/ms724290(v=vs.85).aspx
For a file,the structure specifies when the file is last read from or written to. For a directory,the structure specifies when the directory is created. For both files and directories,the specified date is correct,but the time of day is always set to midnight. If the underlying file system does not support last access time,this member is zero.
从这里:@L_404_3@