Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

Ftp.GetListAsync Method

Namespace: Rebex.Net
Assembly: Rebex.Ftp.dll (version 7.0.9147)

GetListAsync(String, Object)

Begins asynchronous GetList operation. Returns parsed list of files and directories.

Declaration
public Task<FtpItemCollection> GetListAsync(string arguments, object state = null)
Parameters
Type Name Description
String arguments

Arguments for the LIST or MLSD command.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task<FtpItemCollection>

An instance of FtpItemCollection containing the file list.

Remarks

This method will use the MLSD command if the server supports it and it is enabled (see SupportedExtensions and EnabledExtensions properties). It will use the LIST command if MLSD is not supported or disabled.

See ItemParse for information on using custom list parsers.

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 dir 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.

GetListAsync(Object)

Begins asynchronous GetList operation. Returns parsed list of files and directories in the current server directory.

Declaration
public Task<FtpItemCollection> GetListAsync(object state = null)
Parameters
Type Name Description
Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task<FtpItemCollection>

An instance of FtpItemCollection containing the file list.

Remarks

This method will use the MLSD command if the server supports it and it is enabled (see SupportedExtensions and EnabledExtensions properties). It will use the LIST command if MLSD is not supported or disabled.

See ItemParse for information on using custom list parsers.

In This Article
  • GetListAsync(String, Object)
  • GetListAsync(Object)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies