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

Function defaultWriteFile

packages/platform/src/Multipart.ts:473–481  ·  view source on GitHub ↗
(path: string, file: File)

Source from the content-addressed store, hash-verified

471}
472
473const defaultWriteFile = (path: string, file: File) =>
474 Effect.flatMap(
475 FileSystem.FileSystem,
476 (fs) =>
477 Effect.mapError(
478 Stream.run(file.content, fs.sink(path)),
479 (cause) => new MultipartError({ reason: "InternalError", cause })
480 )
481 )
482
483/**
484 * @since 1.0.0

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected