public override string CreateDirectory( string path )
This method implements FTP MKD command.
By default, the directory will be created in the current working directory. If you want to create the directory in another location, you could use the SetCurrentDirectory method to change the current working directory. Absolute paths can also be provided. However, some FTP servers might not support absolute paths, and different server types may have different ways of representing absolute paths. The current working directory can be retrieved via the GetCurrentDirectory method.
CAUTION: The reply codes for MKD command represents the absolute path of the freshly created directory as stated in RFC 959.
However, many FTP servers do not comply with the requirement. In this case, the method returns a null
reference.
Shows how to use CreateDirectory method to create a remote directory.
using ComponentPro.Net; ... // Create a new class instance. Ftp client = new Ftp(); // Connect to the FTP server. client.Connect("myserver"); // Authenticate. client.Authenticate("userName", "password"); // ... // Create 'myFolder' directory. client.CreateDirectory("/myFolder"); // ... // Disconnect. client.Disconnect();