|
The documentation in section about Ftp::GetNameList() method says:
Is this right? The rfc says
about LIST command, and the result of NLST command is simple:
What the better (works on a lot of servers) way to get a file names and their sizes: GetList() or GetNameList() + GetFileSize()? I'm interesting about Ftp and Sftp. |
|
FTP: NSLT The situation with NLST seems to be clear and unambiguous ... but is not. Imagine the following command:
some servers respond with something like this
while other servers respond with different output
FTP: GetNameList + GetFileSize
SFTP: GetNameList, GetList and GetRawList There is only one method for getting a directory content in the SFTP protocol. Those three methods are provided only for convenience and in order to have API similar to FTP component. Best way how to get a directory list FTP: The best way would be calling You can also subscribe to FtpItem.ItemParse event and provide your own parser. Sample parser which processes *nix access rights can be found in Rebex FTP Console Client sample. SFTP: Sftp.GetList() should work everywhere. Thanks for the great answer!
(03 Aug '10, 15:38)
_FRED_
Thanks. Good questions inspire good answers ;-)
(03 Aug '10, 15:48)
Martin Vobr ♦♦
|