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