This commit is contained in:
MapleLeaf
2021-12-30 16:33:41 -06:00
parent 88426791f0
commit 00e36ed81b
7 changed files with 35 additions and 44 deletions

View File

@@ -0,0 +1,10 @@
import { stat } from "node:fs/promises"
export async function isFile(path: string) {
try {
const result = await stat(path)
return result.isFile()
} catch {
return false
}
}