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

Ftp.CreateDirectoryAsync Method

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

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
IFtp.CreateDirectoryAsync(String, Object)
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.

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