title: Remove all sub directories with rimraf on node.js
body: <p>I have a directory structure where certain folder Data has sub directories. At some point I want those removed all at once and I've installed the otherwise awesome <a href="https://www.npmjs.com/package/rimraf" rel="noreferrer">rimraf</a> package for node.js</p>
  
  <p>My code so far:</p>
  
  <pre><code>var dataPath === Path.normalize(__dirname + '/backend/data/');
  
  rimraf(dataPath, function(error) {
      console.log('Error: ', error);
  });
  </code></pre>
  
  <p>I've tried with both <strong><em>/backend/data/</em></strong> and <strong><em>/backend/data/</em> *</strong>, but none seems to do the trick - the first deletes the entire <em>data</em> folder and the second fires an error <em>'Can't delete null'</em></p>
  
  <p>I guess I could scan the main directory, find all sub folders and delete them one by one, but if this can be done with <code>rimraf</code> or a similar package, I'd rather go with it.</p>