Topic Path: Symbol Reference > Classes > TIdFTPListItems Class > TIdFTPListItems Methods > IndexOf Method
TIdFTPListItems.IndexOf Method

Locates a specific item in the structured directory listing collection.

function IndexOf(
    AItem: TIdFTPListItem
): Integer;
Item to locate in the structured directory listing collection. 

Integer - Ordinal position of the requested collection item.

IndexOf is an Integer function used to locate the TIdFTPListItem instance specified in AItem in the Items for the collection. IndexOf returns a zero-based value that indicates the ordinal position of AItem in the collection Items, or -1 when AItem cannot be found in the collection Items

IndexOf iterates over the object instances in Items to perform the object comparision required for the method. Use the Items property to access the collection item in AItem using the ordinal position indicated in the retuirn value for the method.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.