Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Mar : Re: Indy 10 IdFTP.DirectoryListing

www.cryer.info
Managed Newsgroup Archive

Re: Indy 10 IdFTP.DirectoryListing

Subject:Re: Indy 10 IdFTP.DirectoryListing
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Fri, 9 Mar 2007 11:15:28

"Richard Stephens" <rick@almsysinc.com> wrote in message
news:45f1a367$1@newsgroups.borland.com...

> In Indy 10, I am attempting to read the values of
IdFTP.DirectoryListing
> after an IdFTP.List command. Indy 9 always loaded the
DirectoryListing
> when a List command was executed; Indy 10 does not. I get a
> DirectoryListing.Count of zero.

There are dozens of directory listing formats being used on the
Internet.  TIdFTP in Indy 9 could only recognize a few of them, so
that logic was hard-coded directly into TIdFTP.  TIdFTP in Indy 10,
however, uses a new plugin architecture for handling formats for
generically.  However, none of the plugins are active by default, so
no data will be stored in the DirectoryListing.  You have to manually
add the desired IdFTPListParse... units to your uses clause for the
formats you want to support, or add IdAllFTPListParsers to enable them
all.

> Well, it is not working as documented.

Yes, it does.  You are just reading old documentation.  The current
documentation for the DirectoryListing property says the following:

    "Traditionally, the FTP protocol did not specify a standardized
format for file and directory listings in FTP server implementations.
This was done to isolate file system dependencies on the FTP server,
and probably contributed to the wide-spread acceptance and
implementation of the FTP protocol. But this approach also creates
problems when we wish to use automated programs for processing files
and directories using the FTP protocol.

    In recent years, enhancements have been proposed for the FTP
protocol that allow for consistent yet extensible approach to
directory and file listing formats. This has been implemented using
the FTP FEAT command, and its corresponding MLST and MLSD features.

    The Indy library includes support for the MLST and MLSD features,
but also provides additional support for the defacto standard
directory listing formats.

    Additional parsers are available that recognize the defacto
directory listing formats used in approximately 30 different platforms
and operating systems. To include additional parsers for listing
formats, the unit containing the parser must be added to the project
containing the FTP client. Each parser is automatically registered in
the initialization section for the unit. Include the
IdAllFTPListParsers.pas unit in your application to force all known
FTP directory listing parsers to be included and registered."

> Is there a setting in Indy 10 that I need to set that was not
present in Indy 9?

Yes.  See above.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive