title: How to mkdir in Firefox-Addon-sdk?
body: <p>How do I create a new directory/folder programatically? I'm downloading mp3s and saving them but I want to seperate them by genre (newDirectoryName). Here's my code so far.. </p>
  
  <pre><code>function DownloadFile(sLocalFileName, newDirectoryName, sRemoteFileName)
  {
  
  
      var saveToDirectory = 'C:\\Users\\louis\\downloads\\'+newDirectoryName+'\\';
  
      console.log("downloading : "+saveToDirectory);
  
      var chrome = require("chrome");
  
      var oIOService = chrome.Cc["@mozilla.org/network/io-service;1"].getService(chrome.Ci.nsIIOService)
  
      var oLocalFile = chrome.Cc["@mozilla.org/file/local;1"].createInstance(chrome.Ci.nsILocalFile);
      oLocalFile.initWithPath(saveToDirectory + sLocalFileName);
  
      var oDownloadObserver = {onDownloadComplete: function(nsIDownloader, nsresult, oFile) {console.log('download complete...')}};
  
      var oDownloader = chrome.Cc["@mozilla.org/network/downloader;1"].createInstance();
      oDownloader.QueryInterface(chrome.Ci.nsIDownloader);
      oDownloader.init(oDownloadObserver, oLocalFile);
  
      var oHttpChannel = oIOService.newChannel(sRemoteFileName, "", null);
      oHttpChannel.QueryInterface(chrome.Ci.nsIHttpChannel);
      oHttpChannel.asyncOpen(oDownloader, oLocalFile);    
  
  
      console.log("should be downloading!!!!");
  
  }
  DownloadFile('filename.mp3','genre','http://domain.com/file.mp3');
  </code></pre>