blob: 605472536aab015291a662900b748914e237367b (
plain)
1
2
3
4
5
6
7
8
9
10
|
const fs = require('fs')
const util = require('util')
const stat = util.promisify(fs.stat)
const fileExists = (file) => stat(file)
.then((stat) => stat.isFile())
.catch(() => false)
module.exports = fileExists
|