Item(Index: Integer): IFileInfo;
Index - index of a collection element.
The Item property returns description of an element in the collection.
Sub Main;
Var
DirInfo: IDirectoryInfo;
FileList: IFileInfoList;
s: String;
Begin
DirInfo:=New DirectoryInfo.Attach("c:\New_folder");
If DirInfo.Exists Then
FileList:=DirInfo.GetFiles("*");
s:=FileList.Item(0).Name;
End If;
Dispose DirInfo;
End Sub Main;
After executing the example the "s" variable contains name of the first file in the directory C:\New_folder.
See also: