idFTPDirectoryList.name.Strings[i];
IdFTP好像没有这个属性呀,我用的是DELPHI6用以下也不行,出错
function GetNameFromDirLine(Line: string; var IsDirectory: Boolean): string;
var
i: Integer;
DosListing: Boolean;
begin
IsDirectory := Line[1] = 'd';
DosListing := false;
for i := 0 to 7 do begin
if (i = 2) and not IsDirectory then begin
IsDirectory := Copy(Line, 1, Pos(' ', Line) - 1) = '<DIR>';
if not IsDirectory then
DosListing := Line[1] in ['0'..'9']
else DosListing := true;
end;
Delete(Line, 1, Pos(' ', Line));
while Line[1] = ' ' do Delete(Line, 1, 1);
if DosListing and (i = 2) then break;
end;
Result := Line;
end;
filename := GetNameFromDirLine(Line, IsDirectory);[Error] ZmFtp.pas(137): Undeclared identifier: 'IsDirectory'
IdFTP好像没有这个属性呀,我用的是DELPHI6用以下也不行,出错
function GetNameFromDirLine(Line: string; var IsDirectory: Boolean): string;
var
i: Integer;
DosListing: Boolean;
begin
IsDirectory := Line[1] = 'd';
DosListing := false;
for i := 0 to 7 do begin
if (i = 2) and not IsDirectory then begin
IsDirectory := Copy(Line, 1, Pos(' ', Line) - 1) = '<DIR>';
if not IsDirectory then
DosListing := Line[1] in ['0'..'9']
else DosListing := true;
end;
Delete(Line, 1, Pos(' ', Line));
while Line[1] = ' ' do Delete(Line, 1, 1);
if DosListing and (i = 2) then break;
end;
Result := Line;
end;
filename := GetNameFromDirLine(Line, IsDirectory);[Error] ZmFtp.pas(137): Undeclared identifier: 'IsDirectory'
解决方案 »
- ListView 和 DBGrid
- 今天是教师节,祝老师节日快乐;同时提前祝大家中秋快乐
- SOS! @@高手、平手都请进!请问如何得到外部程序文件框(MSN)中的内容
- 刚开始学delphi,问一个简单的问题。
- 初学delphi的数据库,谁能提供一套实际的系统来参考参考
- 小弟有一个做向导的程序,可是有点问题,请大家帮忙. 附:源程序
- 哪位知道d6下类似TColorMemo的空间,最好有源码,先谢了?
- ClientDataSet更新问题
- delphi & ado and Sqlserver
- 哪位同志有李维的主页地址?
- 哪位大虾可以告诉小弟,如何获得本机的IP或者计算机名啊?谢了
- 如何在TStringGrid选择一个矩形框(并获得启始Col,Row和结束Col,Row的值)?
i: Integer;
DosListing: Boolean;
IsDirectory: Boolean;//你忘了定义IsDirectory