SFTP: Create a directory
You need to pass the absolute name of the newly created directory in the "/path/to/directory" form (SFTP doesn't have a concept of "current directory"). Note, that with most SSH servers this method doesn't create the parent directories, if they don't exist. In the above example, if you want to create "directory" directory, and "/path/to" directory doesn't exist, the MakeDirectory() method will fail.
You can optionally pass the attributes for the newly created directory. If you don't want to specify the attributes, you can pass null/Nothing/nil and the server will assign default attributes. Information about the file attributes is provided in the corresponding how-to article.
Higher-level CreateDirectoryPath() method lets you create the complete path with all required directories, eg. "/path/to/nested/directory" will be created even if only "/path" exists before the call.
For information about error handling, see the corresponding how-to article.