Re: FTPServer List of Files Does Not Send to Client. Why ?

Giganews Newsgroups
Subject: Re: FTPServer List of Files Does Not Send to Client. Why ?
Posted by:  Edward (eduglobo20…@globo.com)
Date: Thu, 23 Mar 2006

Its a recursive problem all time there is a guys asking the same think, just
look at Deja, anda the peaplo waste your time to answser the same question.

Why do not post some complete sample for C++Builder ?

I will do that , who with me?

1º) We need a place to put the samples. Maybe athttp://www.codeproject.com/

2º) We can start with FTServer Indy 9.0.50 for C++Builder 6.0.

Best Regards

Edward

"Edward" <eduglobo20…@globo.com> wrote in message
news:0EF0B750D2F1E240eduglobo20…@globo.com...
>
> Why the client are not receive the List of files ?
>
> That is my code:
>
> void __fastcall TForm1::IdFTPServer1ListDirectory(TIdFTPServerThread
> *ASender, const AnsiString APath, TIdFTPListItems *ADirectoryListing)
> {
>  TSearchRec sr;
>  int iAttributes = 0, ct=0;
>  String ADirectory;
>  ADirectory = ASender->HomeDir + APath;
>
>  if (FindFirst( AnsiString("*.*"), iAttributes, sr) == 0)
>  {
>    ADirectoryListing->Add();
>    ADirectoryListing->Items[ct]->FileName = sr.Name;
>    ADirectoryListing->Items[ct]->Size = sr.Size;
>    ADirectoryListing->Items[ct]->ModifiedDate =
> FileDateToDateTime(sr.Time);
>    if(sr.Name.SubString(1,1) == "." || sr.Name.SubString(1,2) == "..")
>    {
>      ADirectoryListing->Items[ct]->ItemType + ditDirectory;
>    }
>    else
>    {
>      ADirectoryListing->Items[ct]->ItemType + ditFile;
>    }
>  }
>  while(FindNext(sr) == 0)
>  {
>    ct++;
>    ADirectoryListing->Add();
>    ADirectoryListing->Items[ct]->FileName = sr.Name;
>    ADirectoryListing->Items[ct]->Size = sr.Size;
>    ADirectoryListing->Items[ct]->ModifiedDate =
> FileDateToDateTime(sr.Time);
>    if(sr.Name.SubString(1,1) == "." || sr.Name.SubString(1,2) == "..")
>    {
>      ADirectoryListing->Items[ct]->ItemType + ditDirectory;
>    }
>    else
>    {
>      ADirectoryListing->Items[ct]->ItemType + ditFile;
>    }
>  }
>  FindClose(sr);
> }
>
> Edward

Replies

In response to

FTPServer List of Files Does Not Send to Client. Why ? posted by Edward on Wed, 22 Mar 2006