| author | |
| committer | |
| log | 0e6c256cd96af224511210d877acef60ac07484f |
| tree | fc4fa0eaa1befbc44823f203417422d4fb08ff29 |
| parent | 41878815ba2fb2ae28194e482ae05629e4ffb79d |
| signature |
2 files changed, 8 insertions(+), 0 deletions(-)
Dir.zig+4| ... | ... | @@ -453,3 +453,7 @@ pub fn copyFile(source_dir: Dir, source_path: [:0]const u8, dest_dir: Dir, dest_ |
| 453 | 453 | return; |
| 454 | 454 | } |
| 455 | 455 | } |
| 456 | ||
| 457 | pub fn dup(self: Dir) !Dir { | |
| 458 | return .{ .fd = @enumFromInt(try sys.dup(@intFromEnum(self.fd))) }; | |
| 459 | } |
File.zig+4| ... | ... | @@ -230,3 +230,7 @@ pub fn realpathAlloc(self: File, allocator: std.mem.Allocator) ![:0]u8 { |
| 230 | 230 | const actual = try self.realpath(&buf); |
| 231 | 231 | return allocator.dupeZ(u8, actual); |
| 232 | 232 | } |
| 233 | ||
| 234 | pub fn dup(self: File) !File { | |
| 235 | return .{ .fd = @enumFromInt(try sys.dup(@intFromEnum(self.fd))) }; | |
| 236 | } |