serverless/lib/utils/fs/fileExists.js
2017-06-08 20:04:46 +07:00

12 lines
206 B
JavaScript

'use strict';
const fse = require('./fse');
function fileExists(filePath) {
return fse.lstatAsync(filePath)
.then((stats) => stats.isFile())
.catch(() => false);
}
module.exports = fileExists;