Home  |  Delphi .net Home  |  System.IO.Directory  |  GetLastAccessTime Method
GetLastAccessTime  
Method  
Gets the date and time that the specified Directory was last accessed
Directory Class
System.IO NameSpace
CF1.  Function GetLastAccessTime ( PathString : String; ) : DateTime; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
The last access date and time of the specified PathString is returned as a DateTime value.
Notes
An exception is thrown if the PathString path is not found.

Static methods are not methods of an object - they are simply class functions or procedures available at any time.
References
DateTime
Microsoft MSDN Links
System.IO
System.IO.Directory
 
 
Get the last access time for the Program Files folder
program Project1;
{$APPTYPE CONSOLE}

uses
  System.IO;

var
  LastAccess : DateTime;

begin
  LastAccess := System.IO.Directory.GetLastAccessTime('C:\Program Files');

  Console.WriteLine(LastAccess);

  Console.Readline;
end.
Show full unit code
  21/09/2004 16:31:25
 
 
Delphi Programming © Neil Moffatt All rights reserved.  |  Contact the author