(target: string, body: Effect.Effect<A, FSUtil.Error>)
| 246 | Effect.fail(new NotFoundError({ message: `Resource not found: ${target}` })) |
| 247 | |
| 248 | const wrap = <A>(target: string, body: Effect.Effect<A, FSUtil.Error>) => |
| 249 | body.pipe(Effect.catchIf(missing, () => fail(target))) |
| 250 | |
| 251 | const writeJson = Effect.fnUntraced(function* (target: string, content: unknown) { |
| 252 | yield* fs.writeWithDirs(target, JSON.stringify(content, null, 2)) |