文件的最后写入时间 [英] Last Write Time of File

查看:101
本文介绍了文件的最后写入时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇,但无法通过谷歌搜索找到答案.文件LastWriteTime的实际时间是多少?是在第一次写入文件时还是在文件写入完成时?谢谢.

I am curious and I haven''t been able to find the answer by googling. What is the actual time of a files LastWriteTime? Is it when the file is first being written or is it when the file finishes being written? Thank you.

推荐答案

如果有内存可用,则在关闭文件时会更新时间.只需用几行代码即可确认.
If memory serves the time is updated when the file is closed. This should be fairly easy to confirm with a few lines of code.


根据GetFileTime()的文档 ^ ] Windows会同时记录创建时间和文件最后写入的时间.选择一个对您有用的.
According to the documentation for GetFileTime() [^] Windows records *both* the creation time *and* the time the file was last written to. Pick the one that''s useful to you.


阅读:

这篇关于文件的最后写入时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆