| ... | @@ -459,6 +459,7 @@ pub const File = struct { | ... | @@ -459,6 +459,7 @@ pub const File = struct { |
| 459 | return index; | 459 | return index; |
| 460 | } | 460 | } |
| 461 | | 461 | |
| | 462 | /// See https://github.com/ziglang/zig/issues/7699 |
| 462 | pub fn readv(self: File, iovecs: []const os.iovec) ReadError!usize { | 463 | pub fn readv(self: File, iovecs: []const os.iovec) ReadError!usize { |
| 463 | if (is_windows) { | 464 | if (is_windows) { |
| 464 | // TODO improve this to use ReadFileScatter | 465 | // TODO improve this to use ReadFileScatter |
| ... | @@ -479,6 +480,7 @@ pub const File = struct { | ... | @@ -479,6 +480,7 @@ pub const File = struct { |
| 479 | /// is not an error condition. | 480 | /// is not an error condition. |
| 480 | /// The `iovecs` parameter is mutable because this function needs to mutate the fields in | 481 | /// The `iovecs` parameter is mutable because this function needs to mutate the fields in |
| 481 | /// order to handle partial reads from the underlying OS layer. | 482 | /// order to handle partial reads from the underlying OS layer. |
| | 483 | /// See https://github.com/ziglang/zig/issues/7699 |
| 482 | pub fn readvAll(self: File, iovecs: []os.iovec) ReadError!usize { | 484 | pub fn readvAll(self: File, iovecs: []os.iovec) ReadError!usize { |
| 483 | if (iovecs.len == 0) return; | 485 | if (iovecs.len == 0) return; |
| 484 | | 486 | |
| ... | @@ -500,6 +502,7 @@ pub const File = struct { | ... | @@ -500,6 +502,7 @@ pub const File = struct { |
| 500 | } | 502 | } |
| 501 | } | 503 | } |
| 502 | | 504 | |
| | 505 | /// See https://github.com/ziglang/zig/issues/7699 |
| 503 | pub fn preadv(self: File, iovecs: []const os.iovec, offset: u64) PReadError!usize { | 506 | pub fn preadv(self: File, iovecs: []const os.iovec, offset: u64) PReadError!usize { |
| 504 | if (is_windows) { | 507 | if (is_windows) { |
| 505 | // TODO improve this to use ReadFileScatter | 508 | // TODO improve this to use ReadFileScatter |
| ... | @@ -520,6 +523,7 @@ pub const File = struct { | ... | @@ -520,6 +523,7 @@ pub const File = struct { |
| 520 | /// is not an error condition. | 523 | /// is not an error condition. |
| 521 | /// The `iovecs` parameter is mutable because this function needs to mutate the fields in | 524 | /// The `iovecs` parameter is mutable because this function needs to mutate the fields in |
| 522 | /// order to handle partial reads from the underlying OS layer. | 525 | /// order to handle partial reads from the underlying OS layer. |
| | 526 | /// See https://github.com/ziglang/zig/issues/7699 |
| 523 | pub fn preadvAll(self: File, iovecs: []const os.iovec, offset: u64) PReadError!void { | 527 | pub fn preadvAll(self: File, iovecs: []const os.iovec, offset: u64) PReadError!void { |
| 524 | if (iovecs.len == 0) return; | 528 | if (iovecs.len == 0) return; |
| 525 | | 529 | |
| ... | @@ -582,6 +586,7 @@ pub const File = struct { | ... | @@ -582,6 +586,7 @@ pub const File = struct { |
| 582 | } | 586 | } |
| 583 | } | 587 | } |
| 584 | | 588 | |
| | 589 | /// See https://github.com/ziglang/zig/issues/7699 |
| 585 | pub fn writev(self: File, iovecs: []const os.iovec_const) WriteError!usize { | 590 | pub fn writev(self: File, iovecs: []const os.iovec_const) WriteError!usize { |
| 586 | if (is_windows) { | 591 | if (is_windows) { |
| 587 | // TODO improve this to use WriteFileScatter | 592 | // TODO improve this to use WriteFileScatter |
| ... | @@ -599,6 +604,7 @@ pub const File = struct { | ... | @@ -599,6 +604,7 @@ pub const File = struct { |
| 599 | | 604 | |
| 600 | /// The `iovecs` parameter is mutable because this function needs to mutate the fields in | 605 | /// The `iovecs` parameter is mutable because this function needs to mutate the fields in |
| 601 | /// order to handle partial writes from the underlying OS layer. | 606 | /// order to handle partial writes from the underlying OS layer. |
| | 607 | /// See https://github.com/ziglang/zig/issues/7699 |
| 602 | pub fn writevAll(self: File, iovecs: []os.iovec_const) WriteError!void { | 608 | pub fn writevAll(self: File, iovecs: []os.iovec_const) WriteError!void { |
| 603 | if (iovecs.len == 0) return; | 609 | if (iovecs.len == 0) return; |
| 604 | | 610 | |
| ... | @@ -615,6 +621,7 @@ pub const File = struct { | ... | @@ -615,6 +621,7 @@ pub const File = struct { |
| 615 | } | 621 | } |
| 616 | } | 622 | } |
| 617 | | 623 | |
| | 624 | /// See https://github.com/ziglang/zig/issues/7699 |
| 618 | pub fn pwritev(self: File, iovecs: []os.iovec_const, offset: u64) PWriteError!usize { | 625 | pub fn pwritev(self: File, iovecs: []os.iovec_const, offset: u64) PWriteError!usize { |
| 619 | if (is_windows) { | 626 | if (is_windows) { |
| 620 | // TODO improve this to use WriteFileScatter | 627 | // TODO improve this to use WriteFileScatter |
| ... | @@ -632,6 +639,7 @@ pub const File = struct { | ... | @@ -632,6 +639,7 @@ pub const File = struct { |
| 632 | | 639 | |
| 633 | /// The `iovecs` parameter is mutable because this function needs to mutate the fields in | 640 | /// The `iovecs` parameter is mutable because this function needs to mutate the fields in |
| 634 | /// order to handle partial writes from the underlying OS layer. | 641 | /// order to handle partial writes from the underlying OS layer. |
| | 642 | /// See https://github.com/ziglang/zig/issues/7699 |
| 635 | pub fn pwritevAll(self: File, iovecs: []os.iovec_const, offset: u64) PWriteError!void { | 643 | pub fn pwritevAll(self: File, iovecs: []os.iovec_const, offset: u64) PWriteError!void { |
| 636 | if (iovecs.len == 0) return; | 644 | if (iovecs.len == 0) return; |
| 637 | | 645 | |