(buffer: Uint8Array)
| 262 | } |
| 263 | |
| 264 | read(buffer: Uint8Array) { |
| 265 | return this.semaphore.withPermits(1)( |
| 266 | Effect.map( |
| 267 | Effect.suspend(() => |
| 268 | nodeRead(this.fd, { |
| 269 | buffer, |
| 270 | position: this.position |
| 271 | }) |
| 272 | ), |
| 273 | (bytesRead) => { |
| 274 | const sizeRead = FileSystem.Size(bytesRead) |
| 275 | this.position = this.position + sizeRead |
| 276 | return sizeRead |
| 277 | } |
| 278 | ) |
| 279 | ) |
| 280 | } |
| 281 | |
| 282 | readAlloc(size: FileSystem.SizeInput) { |
| 283 | const sizeNumber = Number(size) |
no test coverage detected