1,594
社区成员




procedure TMyFileServices.ListFileToClient(AContext: TIdContext; APath : String);
var
SR : TSearchRec;
S : String;
begin
if FindFirst(APath + '*', faAnyFile, SR) = 0 then
try
repeat
if (SR.Name <> '.') and (SR.Name <> '..') then
begin
S := SR.Name + ',' + IntToStr(SR.Size) + ',' + IntToStr(SR.Attr) + ',' + IntToStr(SR.Age);
AContext.Connection.IOHandler.WriteLn(S);
end;
until FindNext(SR) <> 0;
finally
System.SysUtils.FindClose(SR);
end;
end;
try
try
except
end
finally
end