MSDN has this to say about the FILETIME structure and its resolution:
Not all file systems can record creation and last access time and not
all file systems record them in the same manner. For example,on NT
FAT,create time has a resolution of 10 milliseconds,write time has a
resolution of 2 seconds,and access time has a resolution of 1 day
(really,the access date). On NTFS,access time has a resolution of 1
hour. Therefore,the 07001 function may not return the same file
time information set using the 07002 function. Furthermore,FAT
records times on disk in local time. However,NTFS records times on
disk in UTC. For more information,see File Times.
Windows makes use of the FAT,NTFS,exFAT,Live File System and ReFS
file systems (the last of these is only supported and usable in
Windows Server 2012; Windows cannot boot from it).
换句话说,我的问题可归纳为:
在FAT,Live File System和ReFS的分组中,
>对于文件的上次写入时间,哪一个在Windows中具有最差的分辨率?
>对于文件的创建时间,哪一个在Windows中具有最差的分辨率?
FAT8
不记录日期,Windows不支持.
FAT12,FAT16,FAT16B和FAT32
Windows中不支持其中一些.
>上次修改时间:2秒
>创作时间:10毫秒
>访问时间:1天
>删除时间:2秒
exFAT的
所有记录均为10毫秒.
NTFS
所有记录均为100 ns.
实时文件系统(UDF)
所有记录均为1μs.
裁判
无法找到分辨率细节,但它非常现代,所以我假设大多数最坏的情况都在上面,目前没有多少人会使用它.当他们发现时,也许有人可以修饰这篇文章.
那么,回答问题:
1.对于文件的最后写入时间,哪一个在Windows中具有最差的分辨率?
2秒,FAT文件系统.
2.对于文件的创建时间,哪一个在Windows中具有最差的分辨率?
10毫秒,也是FAT文件系统.