serverless/lib/utils/fs/fileExists.js
Mariusz Nowak 4944f471b1
Prettify
2019-06-26 12:43:01 +02:00

13 lines
209 B
JavaScript

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