IFileSystemInfoList.Item

Syntax

Item(Index: Integer): IFileSystemInfo;

Parameters

Index - index of a collection element.

Description

The Item property returns information about a collection element, index of which is passed by the Index parameter.

Example

Sub Main;

Var

DirInfo: IDirectoryInfo;

SysInfoList: IFileSystemInfoList;

s: String;

Begin

DirInfo:=New DirectoryInfo.Attach("c:\New_folder");

If DirInfo.Exists Then

SysInfoList:=DirInfo.GetFileSystemInfos("*");

s:=SysInfoList.Item(0).Name;

End If;

Dispose DirInfo;

End Sub Main;

After executing this example, variable "s" contains number of the first element in a collection.

See also:

IFileSystemInfoList