MCPcopy Create free account
hub / github.com/Effect-TS/effect / defaultWriteFile

Function defaultWriteFile

packages/effect/src/unstable/http/Multipart.ts:621–629  ·  view source on GitHub ↗
(path: string, file: File)

Source from the content-addressed store, hash-verified

619}
620
621const defaultWriteFile = (path: string, file: File) =>
622 Effect.flatMap(
623 FileSystem.FileSystem,
624 (fs) =>
625 Effect.mapError(
626 Stream.run(file.content, fs.sink(path)),
627 (cause) => MultipartError.fromReason("InternalError", cause)
628 )
629 )
630
631/**
632 * Runs a channel of byte chunks and collects all output into a single

Callers

nothing calls this directly

Calls 2

runMethod · 0.45
fromReasonMethod · 0.45

Tested by

no test coverage detected