MCPcopy
hub / github.com/Effect-TS/effect / defaultWriteFile

Function defaultWriteFile

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected