| ... | @@ -14,3 +14,15 @@ pub const Handle = switch (builtin.target.os.tag) { | ... | @@ -14,3 +14,15 @@ pub const Handle = switch (builtin.target.os.tag) { |
| 14 | pub fn cwd() Dir { | 14 | pub fn cwd() Dir { |
| 15 | return .{ .fd = @enumFromInt(sys_libc.AT.FDCWD) }; | 15 | return .{ .fd = @enumFromInt(sys_libc.AT.FDCWD) }; |
| 16 | } | 16 | } |
| | 17 | |
| | 18 | pub fn stdin() File { |
| | 19 | return .{ .fd = @enumFromInt(0) }; |
| | 20 | } |
| | 21 | |
| | 22 | pub fn stdout() File { |
| | 23 | return .{ .fd = @enumFromInt(1) }; |
| | 24 | } |
| | 25 | |
| | 26 | pub fn stderr() File { |
| | 27 | return .{ .fd = @enumFromInt(2) }; |
| | 28 | } |