title: Renci SSH.NET: Is it possible to create a folder containing a subfolder that does not exist
body: <p>I am currently using Renci SSH.NET to upload files and folders to a Unix Server using SFTP, and creating directories using </p>
  
  <pre><code>sftp.CreateDirectory("//server/test/test2");
  </code></pre>
  
  <p>works perfectly, as long as the folder "test" already exists. If it doesn't, the <code>CreateDirectory</code> method fails, and this happens everytime when you try to create directories containing multiple levels.</p>
  
  <p>Is there an elegant way to recursively generate all the directories in a string? I was assuming that the <code>CreateDirectory</code> method does that automatically.</p>