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

Ftp.CreateDirectory Method

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

CreateDirectory(String)

Creates a directory on the server.

Declaration
public string CreateDirectory(string remotePath)
Parameters
Type Name Description
String remotePath

Pathname of the new remote directory.

Returns
Type Description
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.CreateDirectory(String)
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
  • CreateDirectory(String)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies