Ftp.GetRawListAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Ftp.dll (version 7.0.9083)
GetRawListAsync(String, FtpListingType, Object)
Begins asynchronous GetRawList operation. Retrieves the raw list of files and directories as received from the server.
Declaration
public Task<string[]> GetRawListAsync(string arguments, FtpListingType listingType, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | arguments | Arguments for the list command. |
FtpListingType | listingType | The listing command to use. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<String[]> | The array of response lines. |
Remarks
This method supports retrieving the raw listings using either the LIST command or MLSD command. Using GetList is a better choice in most cases, because it returns the parsed list, unlike GetRawList(String, FtpListingType).
Please note that requesting a FtpListingType.MachineProcessingList list will only work on servers that support this extension - this can be determined using the SupportedExtensions property.
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.
GetRawListAsync(Object)
Begins asynchronous GetRawList operation. Retrieves the raw list of files and directories in the current server directory as received from the server.
Declaration
public Task<string[]> GetRawListAsync(object state = null)
Parameters
Type | Name | Description |
---|---|---|
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<String[]> | The array of response lines. |
Implements
Remarks
Represents FTP LIST command.
Because the RFC does not define the format of the file list, this method is often useless. Using GetList is a better choice in most cases.
GetRawListAsync(String, Object)
Begins asynchronous GetRawList operation. Retrieves the raw list of files and directories as received from the server.
Declaration
public Task<string[]> GetRawListAsync(string arguments, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | arguments | Arguments for the LIST command. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<String[]> | The array of response lines. |
Implements
Remarks
Represents FTP LIST command.
Because the RFC does not define the format of the file list, this method is often useless. 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 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.