MCPcopy Create free account
hub / github.com/observablehq/framework / canWrite

Function canWrite

src/create.ts:172–179  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

170}
171
172function canWrite(path: string): boolean {
173 try {
174 accessSync(path, constants.W_OK);
175 return true;
176 } catch {
177 return false;
178 }
179}
180
181function canWriteRecursive(path: string): boolean {
182 while (true) {

Callers 2

validateRootPathFunction · 0.85
canWriteRecursiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected