Re: DirectoryListing

Giganews Newsgroups
Subject: Re: DirectoryListing
Posted by:  J. Peter Mugaas (oma002…@mail.wvnet.edu)
Date: Fri, 13 Feb 2004

On Wed, 11 Feb 2004 16:04:21 -0500, Brandon Shoopman wrote:

> I'm upgrading code that used Indy 9 to Indy 10 becuase I need ftp ssl.  In
> doing so, it seems the directorylisting no longer works.  I have items in
> the listresults stringlist, but these do not get populated into the
> directorylisting structure.  Is there something special I need to do to make
> the directorylisting work in Indy10?
>
Yes, there is and this is described in our knowledge base.  For Indy 10, we
had to completely rework that stuff into a more class oriented manner where
the list objects plug-into your program.  Once, that's done, it should work
again.

Here's the item:

====
TIdFTP.DirectoryListing is returning nothing for my FTP server. Why?

We restructured the way FTP directory listing is done. The code is now a
plug in system with various parsers in their own units which register
themselves into a framework. To add support for a particular type of FTP
server, you simply add the parser unit to one of your program unit's uses
clause.

To add the Unix directory list parser, add IdFTPListParseUnix to your
unit's clause. To add support for Microsoft Windows NT IIS FTP server, add
IdFTPListParseWindowsNT to your uses clause. You can also add many other
parsers we include in the Indy packages. By convention, they are named
IdFTPListParser followed by the server type. You do not need to add
IdFTPListParseBase to your uses clause because IdFTP uses that unit. If you
wish to use all of Indy's FTP List parser classes, just add the
IdAllFTPListParsers unit to your uses clause.

We admit this new design is not as intuitive as the older one but this has
many advantages for us such as:

The FTP list parsing code is now much easier to maintain than the same
code in a non-modular design in one unit which would be at least 150KB
total.
    
You now can add support for only the FTP servers you want your program
support to support.
    
You can now write your own custom parser classes and plug those into the
standard FTP parsing list framework.
===

--
J. Peter Mugaas - Indy Pit Crew
Internet Direct (Indy) Website -http://www.nevrona.com/Indy
Personal Home Page -http://www.wvnet.edu/~oma00215
If I want to do business with you, I will contact you.  Otherwise, do not
contact me.

Replies

None

In response to

DirectoryListing posted by Brandon Shoopman on Wed, 11 Feb 2004