every time I create a FileInfo object and get its lastaccesstime property, it is always in a few minutes. the file properties window remains constant, however, the application shows that it usually passes a few minutes after the time of the properties window.
In addition, I noticed that if I dragged a file into the cmd window to pass the file name as an argument, the access time is updated most of the time, but not always.
What could be the reason for this?
Below is an example:
static void Main(string[] args)
{
if (args.Length > 0)
{
FileInfo fi = new FileInfo(args[0].ToString());
Console.WriteLine(args[0]);
if (fi.Exists)
{
Console.Write("Current: " + DateTime.Now + "\n");
Console.Write("LAT: " + fi.LastAccessTime + "\n");
Console.Write("LWT: " + fi.LastWriteTime + "\n");
Console.Write("CT: " + fi.CreationTime + "\n");
}
Console.ReadKey();
}
}
alt text http://img407.imageshack.us/img407/4728/propertiesox6.png
alt text http://img380.imageshack.us/img380/7752/appgt0.png
source
share