file-exists-by-list
v0.0.1
Published
Node.JS function to check to see if a list of files exists, from an array of paths. Because I got sick of callback hell.
Downloads
10
Readme
file-exists-by-list
Node.JS function to check to see if a list of files exists, from an array of paths.
npm install file-exists-by-list
var fileExistsByList = require("file-exists-by-list");
var check_exists = [
{
name: 'app_path',
file: '~/some/path.txt',
directory: false
},
{
name: 'write_directory_path',
file: '~/some/path/to/directory/'
directory: true
}
];
fileExistsByList(err){
if (err) { console.log("fail!", err) }
else { console.log("success!") }
}