IFileInfo.Directory

Syntax

Directory: IDirectoryInfo;

Description

The Directory property returns description of the directory, in which a file is located.

Example

Sub Main;

Var

FileInf: IFileInfo;

DirInfo: IDirectoryInfo;

d: DateTime;

Begin

FileInf:=New FileInfo.Attach("c:\Work\1.txt");

If FileInf.Exists Then

DirInfo:=FileInf.Directory;

d:=DirInfo.CreationTime;

End If;

Dispose FileInf;

End Sub Main;

After executing the example, the "d" variable contains date and time of creation of a directory, in which the 1.txt file is located.

See also:

IFileInfo