diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-06 17:52:57 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:08 -0800 |
| commit | 8328de24f13e21e325207b19288a143854df50df (patch) | |
| tree | ef7c9c46f969e31258a4c052c85f5a9ecfc34b80 /lib/std/Build/Cache/Path.zig | |
| parent | dd1d15b72aa3bae4b38e2337609758ffb7a7b55a (diff) | |
| download | zig-8328de24f13e21e325207b19288a143854df50df.tar.gz zig-8328de24f13e21e325207b19288a143854df50df.zip | |
update all occurrences of openFile to receive an io instance
Diffstat (limited to 'lib/std/Build/Cache/Path.zig')
| -rw-r--r-- | lib/std/Build/Cache/Path.zig | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/std/Build/Cache/Path.zig b/lib/std/Build/Cache/Path.zig index f6f76c1e8f..60211670de 100644 --- a/lib/std/Build/Cache/Path.zig +++ b/lib/std/Build/Cache/Path.zig @@ -59,18 +59,14 @@ pub fn joinStringZ(p: Path, gpa: Allocator, sub_path: []const u8) Allocator.Erro return p.root_dir.joinZ(gpa, parts); } -pub fn openFile( - p: Path, - sub_path: []const u8, - flags: Io.File.OpenFlags, -) !Io.File { +pub fn openFile(p: Path, io: Io, sub_path: []const u8, flags: Io.File.OpenFlags) !Io.File { var buf: [fs.max_path_bytes]u8 = undefined; const joined_path = if (p.sub_path.len == 0) sub_path else p: { break :p std.fmt.bufPrint(&buf, "{s}" ++ fs.path.sep_str ++ "{s}", .{ p.sub_path, sub_path, }) catch return error.NameTooLong; }; - return p.root_dir.handle.openFile(joined_path, flags); + return p.root_dir.handle.openFile(io, joined_path, flags); } pub fn openDir( |
