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:28:29 |
"John Gilkey" <JohnG@anywhere.corp> wrote in message
news:4427c810@newsgroups.borland.com...
> To see whether a file exists on a server
You need to perform a directory listing and then see if the filename is
listed in it.
> To get its date and size
There are a few different ways to do that:
1) perform a directory listing via TIdFTP.List() with its ADetails parameter
set to True, and then get the details out of the DirectoryListing collection
2) if the server supports the MLST command, you can use the
TIdFTP.ExtListItem() method, and then get the details out of the
DirectoryListing collection
3) if the server supports the MDTM command, you can use the
TIdFTP.FileDate() method.
4) if the server supports the SIZE command, you can use the TIdFTP.Size()
method.
Gambit