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

Function fileWebResponse

packages/platform/bun/src/BunHttpPlatform.ts:46–53  ·  view source on GitHub ↗
(file, status, statusText, headers, options)

Source from the content-addressed store, hash-verified

44 return Response.raw(file, { headers, status, statusText })
45 },
46 fileWebResponse(file, status, statusText, headers, options) {
47 const start = Number(options?.offset ?? 0)
48 const end = options?.bytesToRead !== undefined ? start + Number(options.bytesToRead) : undefined
49 const body = start > 0 || end !== undefined
50 ? (file as File).slice(start, end, file.type)
51 : file
52 return Response.raw(body, { headers, status, statusText })
53 }
54})
55
56/**

Callers

nothing calls this directly

Calls 2

rawMethod · 0.80
NumberInterface · 0.50

Tested by

no test coverage detected