Skip to content

Instantly share code, notes, and snippets.

@ajduke
Created January 24, 2016 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajduke/6ca79d358634a357700e to your computer and use it in GitHub Desktop.
Save ajduke/6ca79d358634a357700e to your computer and use it in GitHub Desktop.
fs = require('fs');
path = 'data/myfile.txt';
fs.exists(path, function(exists){
if(exists){
console.log('yes file exists...');
} else {
console.log('It doesnt exists');
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment