Hi Rafa,
> I found problemn using method o:listFiles()
>
> The problem is sometimes attributes date or time is blank!!
> For examples diferents years in the files in directory;
The problem is that the output of the LIST command is not standardized,
so different FTP servers return differently formatted LIST results. It
is then up to the client to interpret all the different versions of the
result in a consistent way. And ListFiles() is not very good at that.
You can improve it by writing your own tIPClientFTPLocal class that
inherits from tIPClientFTP and replaces the ListFiles() method with a
better one. If you are satisfied with the rest of tIPClientFTP, you can
limit your local class to only that method.
I found that the part of ListFiles() that handles empty entries in the
<aList> array does not work because it deletes such entries and then
skips parsing the next entry (!). So the FOR EACH loop should be run
DESCEND instead of top to bottom. I also had to add a special case that
handles oddly formatted subdirectory names from one specific FTP server.
You may need additional workarounds depending on the FTP servers you
connect to. I can post the changes I made to ListFiles() if you like.
> The solution is using command MLST, when get attributes exact of
> directory / file;
MLST is an extension that is not supported everywhere, so you should
first check if it exists with the FEAT command. Once you have subclassed
tIPClientFTP, you can easily add FEAT and MLST and whatever else you
need to the subclass. But don't count on always being able to use MLST.
The owner/developer of the FTP server might not have implemented it.
> More info;
>
http://tools.ietf.org/html/rfc3659
And FEAT is described there too.
Regards,
Klas