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
GetNameList works almost universally.
GetFileSize is not supported by some FTP servers. And in some FTP servers the SIZE commands returns 0 for directories (so it's hard to decide whether a FTP item is file or directory).
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
The best way would be calling
Ftp.GetList() and let the parser handle all problems. If the format cannot be parsed then call the
Ftp.GetRawList and mail the output to firstname.lastname@example.org. We'll be happy to enhance the built-in parser so it can handle this new format.
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.GetList() should work everywhere.