diff options
| author | Jonathan Marler <johnnymarler@gmail.com> | 2020-06-08 22:34:50 -0600 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-06-09 13:36:17 -0400 |
| commit | a282ac7a9119cd0961ea17e29c4a0e9b0baf60d0 (patch) | |
| tree | a5e8b62dafcdc4fa17ad0dc6ccedf3865a2dd4bc /lib/std/fs | |
| parent | 4302f276ed3083b4f261f9e50a9546c9877d2785 (diff) | |
| download | zig-a282ac7a9119cd0961ea17e29c4a0e9b0baf60d0.tar.gz zig-a282ac7a9119cd0961ea17e29c4a0e9b0baf60d0.zip | |
Support Reader for InStream
Diffstat (limited to 'lib/std/fs')
| -rw-r--r-- | lib/std/fs/file.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/std/fs/file.zig b/lib/std/fs/file.zig index 9db95c4c6f..d950a1cfa4 100644 --- a/lib/std/fs/file.zig +++ b/lib/std/fs/file.zig @@ -642,8 +642,14 @@ pub const File = struct { } } - pub const InStream = io.InStream(File, ReadError, read); + pub const Reader = io.Reader(File, ReadError, read); + /// Deprecated: use `Reader` + pub const InStream = Reader; + pub fn reader(file: File) io.Reader(File, ReadError, read) { + return .{ .context = file }; + } + /// Deprecated: use `reader` pub fn inStream(file: File) io.InStream(File, ReadError, read) { return .{ .context = file }; } |
