SFTP sftp = new SFTP(); //Trial Mode
//SFTP sftp = new SFTP("place user name here", "place license key here");
// set the name of the SSH server( its URL )
sftp.HostAddress = "some.sftp.server.com"; // replace with your SFTP server
sftp.UserName = "anonymous"; // replace with your user name
sftp.Password = "user@mail.com"; // replace with your password
//Uploads all directories, subdirectories and files in the selected Directory asynchronously to the SSH server
System.Console.WriteLine("We are uploading the Download folder to the TestDir folder .This is a non-blocking call");
// All these calls do the same thing
sftp.CreateDirectory("TestDir");
sftp.UploadDirectory("C:\\Download", "TestDir");
/* sftp.UploadDirectory( "C:\\Download", "TestDir" , true, "*.*");
sftp.UploadDirectory( "C:\\Download", "TestDir" , true, new Regex(".+"));
sftp.UploadDirectory( "C:\\Download", "TestDir" , true, DateTime.MinValue, DateTime.MaxValue);
sftp.UploadDirectory( "C:\\Download", "TestDir" , true, 0, Int64.MaxValue);
*/
System.Console.WriteLine("TestDir has now {0} KB", sftp.GetDirectorySize("TestDir") / 1024);