File.GetLastWriteTime seems to be returning 'out of date' value

后端 未结 2 1263
没有蜡笔的小新
没有蜡笔的小新 2020-12-03 22:47

I have written a tool to collect log files within a time window specified by the user of the tool. Up until now I was basing the collection of log files by using the File.Ge

2条回答
  •  孤城傲影
    2020-12-03 23:31

    Tigran is right:

    You can try to compare file size changes, in addition to last write time. It's what I do (with FileSystemWatcher, but it's similar to compare fields within a time window).

提交回复
热议问题