function MakeDir(directory)


The MakeDir function creates a directory. It also creates, if needed, all directories in the path into which the leaf directory is in. Suppose, for example, that a "docs" directory exists in the root of the remote file server, and you MakeDir('/docs/personal/spreadsheets'), the MakeDir function will proceed to create the "personal" directory inside the "docs" directory, and then the "spreadsheets" directory inside the "personal" directory, all with a single function call.

Example:

{
 var scli = new SftpClient();
 scli.Host = 'your.sftpserver.com:22';
 scli.User = 'someusername';
 scli.KeyFile = './my_id.rsa';
 if (scli.Connect()) {
  // perform your file transfers...
  // ...
  scli.MakeDir('/docs/personal/spreadsheets');
  // ...
  scli.Close();
 }
 scli = null
}