unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdFTP, IdFTPList;type TForm1 = class(TForm) Button1: TButton; IdFTP1: TIdFTP; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);var i: integer;begin i := 0; //delphi7.0 indy 9.00.10 IdFTP1.DirectoryListing.Add; if IdFTP1.DirectoryListing.Items.ItemType = ditDirectory then begin showmessage('0'); end else begin showmessage('1'); end;end;end.//我这正常的