code: function(dir) {
  	var list = fs.readdirSync(dir);
  	for(var i = 0; i < list.length; i++) {
  		var filename = path.join(dir, list[i]);
  		var stat = fs.statSync(filename);
  		
  		if(filename == "." || filename == "..") {
  			// pass these files
  		} else if(stat.isDirectory()) {
  			// rmdir recursively
  			_rmdirSync(filename);
  		} else {
  			// rm fiilename
  			fs.unlinkSync(filename);
  		}
  	}
  	fs.rmdirSync(dir);
  }
docs: Helpers