IFileSystemInfoList.Item

Syntax

Item(Index: Integer): IFileSystemInfo;

Parameters

Index - index of a collection element.

Description

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

Example

Sub UserProc;
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 UserProc;

After executing the example, the "s" variable contains the name of the first element in the collection.

See also:

IFileSystemInfoList