Skip to content

Instantly share code, notes, and snippets.

@hackjutsu
Created January 8, 2017 16:19
Show Gist options
  • Save hackjutsu/bc6e9a1345ac050490929c6530978829 to your computer and use it in GitHub Desktop.
Save hackjutsu/bc6e9a1345ac050490929c6530978829 to your computer and use it in GitHub Desktop.
Create a directory if not exist
var fs = require('fs');
var dir = './tmp';
if (!fs.existsSync(dir)){
fs.mkdirSync(dir);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment