Description |
The last access date and time of the specified absolute or relative PathString directory (folder) is set to the specified DateAndTime value.
|
| Notes | Static methods are not methods of an object - they are simply class functions or procedures available at any time.
|
|
Microsoft MSDN Links |
System.IO
System.IO.Directory
|
|
|
Creating a folder, and changing the Last Access date |
program Project1;
{$APPTYPE CONSOLE}
uses
System.IO;
var
Path : String;
begin
// Create a new folder
Path := 'C:\Delphi testing';
System.IO.Directory.CreateDirectory(Path);
// Show the folder last access date and time
Console.WriteLine(System.IO.Directory.GetLastAccessTime(Path));
// Change the last access date and time
System.IO.Directory.SetLastAccessTime(Path, DateTime.Create(2000, 1, 1));
// Show the folder last access date and time again
Console.WriteLine(System.IO.Directory.GetLastAccessTime(Path));
// Delete this temporary folder
System.IO.Directory.Delete(Path);
Console.Readline;
end.
| Show full unit code | 22/09/2004 09:14:50
01/01/2000 00:00:00
|
|
|
|