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

Function ensureConfigFile

apps/desktop/src/main/app-config.ts:658–666  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

656/** Ensure the file exists on disk (writing the current cache if missing) and
657 * return its path. Used by the "Reveal config file" action. */
658export async function ensureConfigFile(): Promise<string> {
659 const file = getConfigFilePath()
660 try {
661 await fs.access(file)
662 } catch {
663 await setPortableConfig({})
664 }
665 return file
666}
667
668/** Test/teardown hook: stop the file watcher. */
669export async function stopAppConfigWatcher(): Promise<void> {

Callers 2

registerIpcFunction · 0.90
app-config.test.tsFile · 0.90

Calls 2

getConfigFilePathFunction · 0.85
setPortableConfigFunction · 0.85

Tested by

no test coverage detected