5,388
社区成员
发帖
与我相关
我的任务
分享
procedure GetDirList(var AFtp:TIdFTP;var AListBox:TListBox;ACurrDirEdit:TEdit);
var
i:Integer;
begin
if not AFtp.Connected then Exit;
ACurrDirEdit.Text := AFtp.RetrieveCurrentDir;//显示当前目录
AFtp.TransferType := ftASCII;
AFtp.List('',False);//先list,然后ListResult属性才会被赋值
AListBox.Items.Assign(AFtp.ListResult);
end;