1.0.0 • Published 8 years ago
fs-exists-promise v1.0.0
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)
})