Delphi Basics Home  |  Delphi Basics .NET Home  |  System.IO.Directory  |  GetLastWriteTime Method
GetLastWriteTime  
Method  
Gets the date and time that the specified Directory was last updated
Directory Class
System.IO NameSpace
CF1.  Function GetLastWriteTime ( PathString : String ) : DateTime; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
The last update 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
System.IO.Directory.GetLastWriteTime
 
Get the last write time for the Program Files folder
program Project1;
{$APPTYPE CONSOLE}

uses
  System.IO;

var
  LastAccess : DateTime;

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

  Console.WriteLine(LastAccess);

  Console.Readline;
end.
   18/09/2004 20:27:17
 
© CodeGear 2006 - 2007. All rights reserved.