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.


 var scli = new SftpClient();
 scli.Host = '';
 scli.User = 'someusername';
 scli.KeyFile = './my_id.rsa';
 if (scli.Connect()) {
  // perform your file transfers...
  // ...
  // ...
 scli = null