MCPcopy Create free account
hub / github.com/formkit/formkit / isDirEmpty

Function isDirEmpty

packages/cli/src/utils.ts:10–17  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

8 * @param path - The absolute path to check if empty.
9 */
10export async function isDirEmpty(path: string) {
11 try {
12 const entries = await readdir(path)
13 return entries.length === 0
14 } catch (error) {
15 return true
16 }
17}
18
19export async function readPackageJSON(dir: string) {
20 const packageJsonPath = resolve(dir, `./package.json`)

Callers 2

completeOptionsFunction · 0.90
createAppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected