( method: string, pathOrDescriptor: string | number | undefined, evaluate: () => AsyncIterable<A> )
| 32 | })) |
| 33 | |
| 34 | const collectAsyncIterable = <A>( |
| 35 | method: string, |
| 36 | pathOrDescriptor: string | number | undefined, |
| 37 | evaluate: () => AsyncIterable<A> |
| 38 | ) => |
| 39 | Effect.tryPromise({ |
| 40 | try: async () => { |
| 41 | const values = new Array<A>() |
| 42 | for await (const value of evaluate()) { |
| 43 | values.push(value) |
| 44 | } |
| 45 | return values |
| 46 | }, |
| 47 | catch: handleError("FileSystem", method, pathOrDescriptor) |
| 48 | }) |
| 49 | |
| 50 | const access: FileSystem.FileSystem["access"] = (path, options) => { |
| 51 | if (!options?.readable && !options?.writable) { |
no test coverage detected