Item(Index: Integer): IFileSystemInfo;
Index - index of a collection element.
The Item property returns information about the collection element, which index is passed by the Index parameter.
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 the example, the "s" variable contains the name of the first element in the collection.
See also: