Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : Re: Converting UNIX file dates/times to Delphi TDateTime
| Subject: | Re: Converting UNIX file dates/times to Delphi TDateTime |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Mon, 27 Mar 2006 11:21:26 |
"John Gilkey" <JohnG@anywhere.corp> wrote in message
news:4427a709$1@newsgroups.borland.com...
> How does Indy 10 support getting a file list and convert the
> Unix date / time to a Delphi TDateTime?
The TIdFTP component in Indy 10 implements a plugin architecture for parsing
directory listings. It performs a directly listing like any other FTP
client implementation does, and then passes the raw data into the parser
system. The data is passed from one parser to the next until one of the
them recognizes the format of the data, at which time that parser extracts
the relavant values and converts them into VCL types automatically.
All of this is transparent to the programmer, btw. In your own code, all
you have to do is include the desired parser unit(s) into your 'uses' clause
(or 'IdAllFTPListParsers' to get all of the parsers) and then access the
TIdFTP's DirectoryListing property after calling its List() method. The
DirectoryListing is a collection of TIdFTPListItem items for the parsed
data. TIdFTPListItem has a ModifiedDate property that is a TDateTime.
Gambit
none