serverless/lib/utils/fs/fileExists.js
2020-05-13 16:16:17 +02:00

13 lines
207 B
JavaScript

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