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