The ListAttributes method will send a request to the server to
retrieve the complete directory structure in a collection of
SftpItem objects,
rather than a line-by-line listing that needs to be parsed.
As a result of calling this method, the
AttributesData event will
fire (possibly more than once if there are many files in
the directory), where you can access each item's
Name and
Permissions etc..
Once completed, the Done event will be
fired. If no error occurs, the ErrorCode argument in the Done event will be set to
0 (zero). If an error occurs, the ErrorCode will hold the number of the error and
ErrorText will contain a description
for the error.
No wildcards can be used for the RemotePath argument. The RFC
protocol specification for SFTP does not allow them.
To retrieve a full listing of files/directories for a given
path (including size, permissions, dates...) you should use the
ListDir
method. To get just names, you can use ListNames.