MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / vaultLooksEmpty

Function vaultLooksEmpty

apps/desktop/src/main/vault.ts:1121–1134  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

1119}
1120
1121async function vaultLooksEmpty(root: string): Promise<boolean> {
1122 let entries: Dirent[]
1123 try {
1124 entries = await fs.readdir(root, { withFileTypes: true })
1125 } catch {
1126 return true
1127 }
1128 for (const entry of entries) {
1129 if (entry.name.startsWith('.')) continue
1130 if (entry.name === INTERNAL_VAULT_DIR) continue
1131 return false
1132 }
1133 return true
1134}
1135
1136export async function getVaultSettings(root: string): Promise<VaultSettings> {
1137 let fallbackPrimary = DEFAULT_VAULT_SETTINGS.primaryNotesLocation

Callers 1

ensureVaultLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected