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

Function isWritableDir

apps/desktop/src/main/cli-install.ts:139–148  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

137}
138
139async function isWritableDir(dir: string): Promise<boolean> {
140 try {
141 const st = await fsp.stat(dir)
142 if (!st.isDirectory()) return false
143 await fsp.access(dir, fs.constants.W_OK)
144 return true
145 } catch {
146 return false
147 }
148}
149
150interface InstallTarget {
151 /** Absolute path to <dir>/zn — where the symlink would land. */

Callers 2

pickInstallTargetFunction · 0.85
installCliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected