Creates a directory on the server.

Namespace:  Rebex.Net
Assembly:  Rebex.Ftp (in Rebex.Ftp.dll)

Syntax

Visual Basic
Public Function CreateDirectory ( _
	remotePath As String _
) As String
C#
public string CreateDirectory(
	string remotePath
)

Parameters

remotePath
Type: System..::..String
Pathname of the new remote directory.

Return Value

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.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also