(buffer: Uint8Array)
| 321 | } |
| 322 | |
| 323 | write(buffer: Uint8Array) { |
| 324 | return this.semaphore.withPermits(1)( |
| 325 | Effect.map( |
| 326 | Effect.suspend(() => |
| 327 | nodeWrite(this.fd, buffer, undefined, undefined, this.append ? undefined : Number(this.position)) |
| 328 | ), |
| 329 | (bytesWritten) => { |
| 330 | const sizeWritten = FileSystem.Size(bytesWritten) |
| 331 | if (!this.append) { |
| 332 | this.position = this.position + sizeWritten |
| 333 | } |
| 334 | |
| 335 | return sizeWritten |
| 336 | } |
| 337 | ) |
| 338 | ) |
| 339 | } |
| 340 | |
| 341 | private writeAllChunk(buffer: Uint8Array): Effect.Effect<void, Error.PlatformError> { |
| 342 | return Effect.flatMap( |
nothing calls this directly
no test coverage detected