(length?: FileSystem.SizeInput)
| 327 | } |
| 328 | |
| 329 | truncate(length?: FileSystem.SizeInput) { |
| 330 | return Effect.map(nodeTruncate(this.fd, length ? Number(length) : undefined), () => { |
| 331 | if (!this.append) { |
| 332 | const len = BigInt(length ?? 0) |
| 333 | if (this.position > len) { |
| 334 | this.position = len |
| 335 | } |
| 336 | } |
| 337 | }) |
| 338 | } |
| 339 | |
| 340 | write(buffer: Uint8Array) { |
| 341 | return Effect.suspend(() => { |