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

Method read

packages/platform/node-shared/src/NodeFileSystem.ts:290–302  ·  view source on GitHub ↗
(buffer: Uint8Array)

Source from the content-addressed store, hash-verified

288 }
289
290 read(buffer: Uint8Array) {
291 return Effect.suspend(() => {
292 const position = this.position
293 return Effect.map(
294 nodeRead(this.fd, { buffer, position }),
295 (bytesRead) => {
296 const sizeRead = FileSystem.Size(bytesRead)
297 this.position = position + sizeRead
298 return sizeRead
299 }
300 )
301 })
302 }
303
304 readAlloc(size: FileSystem.SizeInput) {
305 const sizeNumber = Number(size)

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected