Skip to content

Instantly share code, notes, and snippets.

@danielgospodinow
Created July 13, 2019 13:21
Show Gist options
  • Save danielgospodinow/3d3f687985d7642c01813931b59ef901 to your computer and use it in GitHub Desktop.
Save danielgospodinow/3d3f687985d7642c01813931b59ef901 to your computer and use it in GitHub Desktop.
Screentopia - ensure image folder function
function ensureImagesFolder(imageDirectory) {
if (!fs.existsSync(imageDirectory)) {
console.log("Creating folder for image storage ...");
fs.mkdirSync(imageDirectory);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment