(buffer: Uint8Array)
| 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) |