mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
11 lines
200 B
JavaScript
11 lines
200 B
JavaScript
import { promises as fsp } from 'fs'
|
|
|
|
async function fileExists(filePath) {
|
|
return fsp
|
|
.lstat(filePath)
|
|
.then((stats) => stats.isFile())
|
|
.catch(() => false)
|
|
}
|
|
|
|
export default fileExists
|