This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
|
import path from 'path'
|
|
import Promise from 'bluebird'
|
|
import fs from 'fs'
|
|
|
|
const access = Promise.promisify(fs.access)
|
|
|
|
async function exists (fpath) {
|
|
try {
|
|
await access(path.resolve(fpath))
|
|
} catch (e) {
|
|
return false
|
|
}
|
|
|
|
return true
|
|
}
|
|
|
|
module.exports = exists
|