fs-exists-promise
v1.0.0
Published
Like fs.exists(), but a promise
Downloads
3
Readme
fs-exists-promise
Provides functionality similar to the deprecated fs.exists()
.
Install
npm install fs-exists-promise
Usage
// take note that you need to pass a legit path to fs-exists-promise.
var fsExists = require('fs-exists-promise')
fsExists(resolve(__dirname, './something-you-are-looking-for'))
.then(function (truth) {
doSomething()
})
.catch(function(err) {
// catch, you fool.
console.log(err)
})