Ftp.CreateDirectoryAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Ftp.dll (version 7.0.9083)
CreateDirectoryAsync(String, Object)
Begins asynchronous CreateDirectory operation. Creates a directory on the server.
Declaration
public Task<string> CreateDirectoryAsync(string remotePath, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | remotePath | Pathname of the new remote directory. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<String> | A string containing the absolute path of the newly created remote directory if the server complies to RFC 959; otherwise, null reference is returned. |
Implements
Remarks
Represents FTP MKD command.
CAUTION: RFC states that successful reply to the MKD command must always contain the absolute path of the created directory. However, many FTP servers do not comply to this requirement, for example wu-ftpd 2.4.2, (which is still widely used, although newer releases fixed this bug). Therefore, when the response is unparsable, this method returns a null reference instead of throwing an exception.