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

Function fileResponse

packages/platform-bun/src/internal/httpPlatform.ts:9–15  ·  view source on GitHub ↗
(path, status, statusText, headers, start, end, _contentLength)

Source from the content-addressed store, hash-verified

7/** @internal */
8export const make = Platform.make({
9 fileResponse(path, status, statusText, headers, start, end, _contentLength) {
10 let file = Bun.file(path)
11 if (start > 0 || end !== undefined) {
12 file = file.slice(start, end)
13 }
14 return ServerResponse.raw(file, { headers, status, statusText })
15 },
16 fileWebResponse(file, status, statusText, headers, _options) {
17 return ServerResponse.raw(file, { headers, status, statusText })
18 }

Callers

nothing calls this directly

Calls 1

rawMethod · 0.80

Tested by

no test coverage detected