Rebex FTP for .NET

Ftp.BeginGetNameList Method (String, AsyncCallback, Object)

Retrieves the list of names.

public IAsyncResult BeginGetNameList(
   string arguments,
   AsyncCallback callback,
   object state
);

Parameters

arguments
Arguments for the NLST command.
callback
An optional asynchronous callback to be called when the operation is complete.
state
A user-provided object that identifies this particular asynchronous operation.

Return Value

An IAsyncResult that references the asynchronous operation.

Remarks

Represents FTP NLST command.

Actual behaviour of NLST command varies from server to server, because the RFC is not clear in explaining what it should do. Some servers return the names of both files and directories, others return files only or even report error if the current directory is empty. Using GetList is a better choice in most cases.

Caution: The meaning of the arguments argument is not defined by RFC and varies from server to server. Some servers interpret it as parameters to ls command, some as a filename, some ignore it and some report an error. Calling this method with arguments other than null is not recommended and will make your code incompatible with many FTP servers.

See Also

Ftp Class | Rebex.Net Namespace | Ftp.BeginGetNameList Overload List