failed attempt at automatic index generation
This commit is contained in:
10
packages/docs/app/filesystem.ts
Normal file
10
packages/docs/app/filesystem.ts
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user