SocketTools .NET Edition

FtpClient.RemoveDirectory Method 

Remove a directory on the server.

[Visual Basic]
Public Function RemoveDirectory( _
   ByVal pathName As String _
) As Boolean
[C#]
public bool RemoveDirectory(
   string pathName
);

Parameters

pathName
A string that specifies the name of the directory to remove from the server. The naming and pathing conventions used for the directory must be compatible with what is used on the operating system that hosts the server.

Return Value

This method returns a boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. To get extended error information, check the value of the LastError property.

Remarks

The RemoveDirectory method removes an existing directory on the remote host. You must have the appropriate permission to remove the directory, or an error will occur. Note that most operating systems will not permit you to remove a directory that contains files or other subdirectories.

See Also

FtpClient Class | SocketTools Namespace