serverless/lib/utils/fs/dirExistsSync.js
2017-10-06 16:37:19 +03:00

15 lines
234 B
JavaScript

'use strict';
const fse = require('./fse');
function dirExistsSync(dirPath) {
try {
const stats = fse.statSync(dirPath);
return stats.isDirectory();
} catch (e) {
return false;
}
}
module.exports = dirExistsSync;