Get Attributes - WeOnlyDo Discussion board

Get Attributes (wodSFTP / wodSFTP.NET / wodSFTPdll)

by tamara3776, Tuesday, August 10, 2004, 17:35 (7170 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.

Re: Get Attributes

by wodSupport, Tuesday, August 10, 2004, 17:44 (7170 days ago) @ tamara3776

Tamara,

I'm having trouble fully understanding your code fragment.

Can you please zip your full delphi code and email it to techsupport@weonlydo.com ? I will try to run it from here and see what is causing your problems.

Regards,
Kreso

Re: Get Attributes

by tamara3776, Wednesday, August 11, 2004, 17:57 (7169 days ago) @ wodSupport

Thanks,
I sent you the file and hopefully you can help me out with the issue