(target: string)
| 243 | ) |
| 244 | |
| 245 | const fail = (target: string): Effect.Effect<never, NotFoundError> => |
| 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))) |