Back to product page

ListAttributes method


Lists contents of a directory on the server.

Type

Void

Syntax

  • C#
  • VB.NET
public Void ListAttributes(String RemotePath);
The ListAttributes(RemotePath) syntax has these parts:
RemotePathFull path to directory that should be listed.

public Sub ListAttributes(ByVal RemotePath As String)
The ListAttributes(RemotePath) syntax has these parts:
RemotePathFull path to directory that should be listed.

Remarks

ListAttributes method will send request to the server to retrieve complete directory structure in collection of RemoteFileInfo objects, rather than line-by-line listing that needs to be parsed. As a result of this method call, AttributesData event will fire (possibly more than once, if there are many files in the directory) where you can access each item's Name, Permissions, etc.. Once completed, Done event will be fired.

To retrieve full listing of files/directories on a given path (including size, permissions, dates...) you should use ListDir method. To get only names, you can use ListNames.

No wildcards can be used for RemotePath argument. RFC protocol specification for SFTP does not allow them.

Platforms

Windows