(dir: string)
| 137 | } |
| 138 | |
| 139 | async 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 | |
| 150 | interface InstallTarget { |
| 151 | /** Absolute path to <dir>/zn — where the symlink would land. */ |
no outgoing calls
no test coverage detected