GetCreationTime(Path: String): DateTime;
Path - a directory, date and time of creation of which should be got.
The GetCreationTime method returns date and time of a directory creation.
Sub UserProc(sPath: String);
Var
Culture: ICultureInfo;
d: DateTime;
Begin
If Directory.Exists(sPath) Then
Culture := CultureInfo.Current;
d := Directory.GetCreationTime(sPath);
Debug.WriteLine("Date and time of directory creation: " +
Culture.FormatLongDate(d) + Culture.FormatTime(d));
End If;
End Sub UserProc;
While executing this example it is checked whether directory, specified in the parameter sPath, is present in file system. If a directory exists date and time of its creation is displayed in development environment console.
See also: