When I call FileInfo(path).LastAccessTime or FileInfo(path).LastWriteTime on a file that is in the process of being written it returns the time tha
FileInfo(path).LastAccessTime
FileInfo(path).LastWriteTime
The FileInfo values are only loaded once and then cached. To get the current value, call Refresh() before getting a property:
FileInfo
Refresh()
f.Refresh(); t = f.LastAccessTime;
Another way to get the current value is by using the static methods on the File class:
File
t = File.GetLastAccessTime(path);