mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
13 lines
218 B
JavaScript
13 lines
218 B
JavaScript
'use strict';
|
|
|
|
const fsp = require('fs').promises;
|
|
|
|
async function fileExists(filePath) {
|
|
return fsp
|
|
.lstat(filePath)
|
|
.then((stats) => stats.isFile())
|
|
.catch(() => false);
|
|
}
|
|
|
|
module.exports = fileExists;
|