File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1122,10 +1122,15 @@ pub const Reader = struct {
11221122 /// position, use `logicalPos`.
11231123 pos : u64 = 0 ,
11241124 size : ? u64 = null ,
1125- size_err : ? GetEndPosError = null ,
1125+ size_err : ? SizeError = null ,
11261126 seek_err : ? Reader.SeekError = null ,
11271127 interface : std.Io.Reader ,
11281128
1129+ pub const SizeError = std .os .windows .GetFileSizeError || StatError || error {
1130+ /// Occurs if, for example, the file handle is a network socket and therefore does not have a size.
1131+ Streaming ,
1132+ };
1133+
11291134 pub const SeekError = File .SeekError || error {
11301135 /// Seeking fell back to reading, and reached the end before the requested seek position.
11311136 /// `pos` remains at the end of the file.
Original file line number Diff line number Diff line change @@ -2064,6 +2064,7 @@ pub const Stream = struct {
20642064 .file = .{ .handle = net_stream .handle },
20652065 .mode = .streaming ,
20662066 .seek_err = error .Unseekable ,
2067+ .size_err = error .Streaming ,
20672068 },
20682069 };
20692070 }
You can’t perform that action at this time.
0 commit comments