11 lines
182 B
TypeScript
11 lines
182 B
TypeScript
|
|
import { stat } from 'fs/promises'
|
||
|
|
|
||
|
|
export const exists = async (path: string) => {
|
||
|
|
try {
|
||
|
|
await stat(path)
|
||
|
|
return true
|
||
|
|
} catch {
|
||
|
|
return false
|
||
|
|
}
|
||
|
|
}
|