Open jessekelly881 opened 7 months ago
+1 to this. Untill then (BYO error handling):
import fg from 'fast-glob'
export const glob = (path: string) => (cwd: string) => Effect.tryPromise({
try: () => fg(path, { cwd }),
catch: (cause) => createFilesystemError(`Glob Error`, { cause })
})
It would be nice to have an @effect/platform native file glob similar to https://www.npmjs.com/package/glob that could be used w/ any FileSystem implementation.
(Bun has a built in implementation https://bun.sh/docs/api/glob)