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

Method constructor

packages/platform/node/src/NodeMultipart.ts:136–149  ·  view source on GitHub ↗
(file: MP.FileStream)

Source from the content-addressed store, hash-verified

134 readonly file: MP.FileStream
135
136 constructor(file: MP.FileStream) {
137 super()
138 this.file = file
139 this.key = file.info.name
140 this.name = file.filename ?? file.info.name
141 this.contentType = file.info.contentType
142 this.content = NodeStream.fromReadable({
143 evaluate: () => file,
144 onError: (cause) => Multipart.MultipartError.fromReason("InternalError", cause)
145 })
146 this.contentEffect = NodeStream.toUint8Array(() => file, {
147 onError: (cause) => Multipart.MultipartError.fromReason("InternalError", cause)
148 })
149 }
150
151 toJSON(): unknown {
152 return {

Callers

nothing calls this directly

Calls 1

fromReasonMethod · 0.45

Tested by

no test coverage detected