MCPcopy Index your code
hub / github.com/Effect-TS/effect / fileInfo

Function fileInfo

packages/platform/src/internal/httpBody.ts:158–171  ·  view source on GitHub ↗
(
  path: string,
  info: FileSystem.File.Info,
  options?: FileSystem.StreamOptions & { readonly contentType?: string }
)

Source from the content-addressed store, hash-verified

156
157/** @internal */
158export const fileInfo = (
159 path: string,
160 info: FileSystem.File.Info,
161 options?: FileSystem.StreamOptions & { readonly contentType?: string }
162): Effect.Effect<Body.Stream, PlatformError.PlatformError, FileSystem.FileSystem> =>
163 Effect.map(
164 FileSystem.FileSystem,
165 (fs) =>
166 stream(
167 fs.stream(path, options),
168 options?.contentType,
169 Number(info.size)
170 )
171 )
172
173/** @internal */
174export const fileWeb = (file: Body.HttpBody.FileLike): Body.Stream =>

Callers

nothing calls this directly

Calls 4

NumberInterface · 0.85
streamFunction · 0.70
mapMethod · 0.65
streamMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…