Get Attributes - WeOnlyDo Discussion board

Get Attributes (wodSFTP / wodSFTP.NET / wodSFTPdll)

by tamara3776, Tuesday, August 10, 2004, 17:35 (7410 days ago)

I am trying to display the file size along with the file names that reside on a SFTP server inside a ListView component. I use the following code to display the names but am having no luck with displaying the file size
[code]
var
a: string;
i: integer;
strs : TStringList;
NewItem: TListItem;
begin
if LastState = 0 then //listing directory
begin
// get one line
strs := TStringList.Create;
a := FileInfo;
strs.SetText(PChar(a));
for i:=0 to strs.Count-1 do
begin
NewItem := ListView1.Items.Add;
NewItem.Caption := strs;
end;
end;
end;
[/code]
If anyone can help me alter this code to display the file size as well it will be greatly appreciated.


Complete thread: