authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-02 18:46:25-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-04 00:27:08-08:00
log4afed3e9ef83724bdfddd1d06b7727acda55e642
tree5b208954088cea6efd753ac4c6b4dd110b916487
parente149c0e2aa9e35ce90760ebef158bb05f3a74d0d

test-standalone: update the rest of the cases to new API


8 files changed, 53 insertions(+), 66 deletions(-)

lib/compiler/objcopy.zig+4-14
...@@ -17,20 +17,10 @@ var stdout_buffer: [1024]u8 = undefined;...@@ -17,20 +17,10 @@ var stdout_buffer: [1024]u8 = undefined;
17var input_buffer: [1024]u8 = undefined;17var input_buffer: [1024]u8 = undefined;
18var output_buffer: [1024]u8 = undefined;18var output_buffer: [1024]u8 = undefined;
1919
20pub fn main() !void {20pub fn main(init: std.process.Init) !void {
21 var arena_instance = std.heap.ArenaAllocator.init(std.heap.page_allocator);21 const arena = init.arena.allocator();
22 defer arena_instance.deinit();22 const args = try init.minimal.args.toSlice(arena);
23 const arena = arena_instance.allocator();23 return cmdObjCopy(arena, init.io, args[1..]);
24
25 var general_purpose_allocator: std.heap.GeneralPurposeAllocator(.{}) = .init;
26 const gpa = general_purpose_allocator.allocator();
27
28 var threaded: std.Io.Threaded = .init(gpa, .{});
29 defer threaded.deinit();
30 const io = threaded.io();
31
32 const args = try std.process.argsAlloc(arena);
33 return cmdObjCopy(arena, io, args[1..]);
34}24}
3525
36fn cmdObjCopy(arena: Allocator, io: Io, args: []const []const u8) !void {26fn cmdObjCopy(arena: Allocator, io: Io, args: []const []const u8) !void {
test/standalone/child_process/main.zig+8-2
...@@ -9,6 +9,12 @@ pub fn main(init: std.process.Init.Minimal) !void {...@@ -9,6 +9,12 @@ pub fn main(init: std.process.Init.Minimal) !void {
9 };9 };
10 const gpa = gpa_state.allocator();10 const gpa = gpa_state.allocator();
1111
12 const process_cwd_path = try std.process.getCwdAlloc(gpa);
13 defer gpa.free(process_cwd_path);
14
15 var env_map = try init.environ.createMap(gpa);
16 defer env_map.deinit();
17
12 var it = try init.args.iterateAllocator(gpa);18 var it = try init.args.iterateAllocator(gpa);
13 defer it.deinit();19 defer it.deinit();
14 _ = it.next() orelse unreachable; // skip binary name20 _ = it.next() orelse unreachable; // skip binary name
...@@ -17,7 +23,7 @@ pub fn main(init: std.process.Init.Minimal) !void {...@@ -17,7 +23,7 @@ pub fn main(init: std.process.Init.Minimal) !void {
17 const cwd_path = it.next() orelse break :child_path .{ child_path, false };23 const cwd_path = it.next() orelse break :child_path .{ child_path, false };
18 // If there is a third argument, it is the current CWD somewhere within the cache directory.24 // If there is a third argument, it is the current CWD somewhere within the cache directory.
19 // In that case, modify the child path in order to test spawning a path with a leading `..` component.25 // In that case, modify the child path in order to test spawning a path with a leading `..` component.
20 break :child_path .{ try std.fs.path.relative(gpa, cwd_path, child_path), true };26 break :child_path .{ try std.fs.path.relative(gpa, process_cwd_path, &env_map, cwd_path, child_path), true };
21 };27 };
22 defer if (needs_free) gpa.free(child_path);28 defer if (needs_free) gpa.free(child_path);
2329
...@@ -28,7 +34,7 @@ pub fn main(init: std.process.Init.Minimal) !void {...@@ -28,7 +34,7 @@ pub fn main(init: std.process.Init.Minimal) !void {
28 defer threaded.deinit();34 defer threaded.deinit();
29 const io = threaded.io();35 const io = threaded.io();
3036
31 var child = try std.process.spawn(.{37 var child = try std.process.spawn(io, .{
32 .argv = &.{ child_path, "hello arg" },38 .argv = &.{ child_path, "hello arg" },
33 .stdin = .pipe,39 .stdin = .pipe,
34 .stdout = .pipe,40 .stdout = .pipe,
test/standalone/empty_env/main.zig+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1const std = @import("std");1const std = @import("std");
22
3pub fn main(init: std.process.Init) !void {3pub fn main(init: std.process.Init) !void {
4 try std.testing.expect(init.env_map.count() == 0);4 try std.testing.expectEqual(0, init.env_map.count());
5}5}
test/standalone/env_vars/main.zig+5-5
...@@ -104,20 +104,20 @@ pub fn main(init: std.process.Init) !void {...@@ -104,20 +104,20 @@ pub fn main(init: std.process.Init) !void {
104 // getAlloc104 // getAlloc
105 {105 {
106 try std.testing.expectEqualSlices(u8, "123", try environ.getAlloc(arena, "FOO"));106 try std.testing.expectEqualSlices(u8, "123", try environ.getAlloc(arena, "FOO"));
107 try std.testing.expectError(error.EnvironmentVariableNotFound, environ.getAlloc(arena, "FOO="));107 try std.testing.expectError(error.EnvironmentVariableMissing, environ.getAlloc(arena, "FOO="));
108 try std.testing.expectError(error.EnvironmentVariableNotFound, environ.getAlloc(arena, "FO"));108 try std.testing.expectError(error.EnvironmentVariableMissing, environ.getAlloc(arena, "FO"));
109 try std.testing.expectError(error.EnvironmentVariableNotFound, environ.getAlloc(arena, "FOOO"));109 try std.testing.expectError(error.EnvironmentVariableMissing, environ.getAlloc(arena, "FOOO"));
110 if (builtin.os.tag == .windows) {110 if (builtin.os.tag == .windows) {
111 try std.testing.expectEqualSlices(u8, "123", try environ.getAlloc(arena, "foo"));111 try std.testing.expectEqualSlices(u8, "123", try environ.getAlloc(arena, "foo"));
112 }112 }
113 try std.testing.expectEqualSlices(u8, "ABC=123", try environ.getAlloc(arena, "EQUALS"));113 try std.testing.expectEqualSlices(u8, "ABC=123", try environ.getAlloc(arena, "EQUALS"));
114 try std.testing.expectError(error.EnvironmentVariableNotFound, environ.getAlloc(arena, "EQUALS=ABC"));114 try std.testing.expectError(error.EnvironmentVariableMissing, environ.getAlloc(arena, "EQUALS=ABC"));
115 try std.testing.expectEqualSlices(u8, "non-ascii አማርኛ \u{10FFFF}", try environ.getAlloc(arena, "КИРиллИЦА"));115 try std.testing.expectEqualSlices(u8, "non-ascii አማርኛ \u{10FFFF}", try environ.getAlloc(arena, "КИРиллИЦА"));
116 if (builtin.os.tag == .windows) {116 if (builtin.os.tag == .windows) {
117 try std.testing.expectEqualSlices(u8, "non-ascii አማርኛ \u{10FFFF}", try environ.getAlloc(arena, "кирИЛЛица"));117 try std.testing.expectEqualSlices(u8, "non-ascii አማርኛ \u{10FFFF}", try environ.getAlloc(arena, "кирИЛЛица"));
118 }118 }
119 try std.testing.expectEqualSlices(u8, "", try environ.getAlloc(arena, "NO_VALUE"));119 try std.testing.expectEqualSlices(u8, "", try environ.getAlloc(arena, "NO_VALUE"));
120 try std.testing.expectError(error.EnvironmentVariableNotFound, environ.getAlloc(arena, "NOT_SET"));120 try std.testing.expectError(error.EnvironmentVariableMissing, environ.getAlloc(arena, "NOT_SET"));
121 if (builtin.os.tag == .windows) {121 if (builtin.os.tag == .windows) {
122 try std.testing.expectEqualSlices(u8, "hi", try environ.getAlloc(arena, "=HIDDEN"));122 try std.testing.expectEqualSlices(u8, "hi", try environ.getAlloc(arena, "=HIDDEN"));
123 try std.testing.expectEqualSlices(u8, "\xed\xa0\x80", try environ.getAlloc(arena, "INVALID_UTF16_\xed\xa0\x80"));123 try std.testing.expectEqualSlices(u8, "\xed\xa0\x80", try environ.getAlloc(arena, "INVALID_UTF16_\xed\xa0\x80"));
test/standalone/self_exe_symlink/create-symlink.zig+1-1
...@@ -9,7 +9,7 @@ pub fn main(init: std.process.Init) !void {...@@ -9,7 +9,7 @@ pub fn main(init: std.process.Init) !void {
9 const exe_path = it.next() orelse unreachable;9 const exe_path = it.next() orelse unreachable;
10 const symlink_path = it.next() orelse unreachable;10 const symlink_path = it.next() orelse unreachable;
1111
12 const cwd = std.process.getCwdAlloc(init.arena.allocator());12 const cwd = try std.process.getCwdAlloc(init.arena.allocator());
1313
14 // If `exe_path` is relative to our cwd, we need to convert it to be relative to the dirname of `symlink_path`.14 // If `exe_path` is relative to our cwd, we need to convert it to be relative to the dirname of `symlink_path`.
15 const exe_rel_path = try std.fs.path.relative(gpa, cwd, init.env_map, std.fs.path.dirname(symlink_path) orelse ".", exe_path);15 const exe_rel_path = try std.fs.path.relative(gpa, cwd, init.env_map, std.fs.path.dirname(symlink_path) orelse ".", exe_path);
tools/fetch_them_macos_headers.zig+9-16
...@@ -6,13 +6,9 @@ const process = std.process;...@@ -6,13 +6,9 @@ const process = std.process;
6const assert = std.debug.assert;6const assert = std.debug.assert;
7const fatal = std.process.fatal;7const fatal = std.process.fatal;
8const info = std.log.info;8const info = std.log.info;
99const Allocator = std.mem.Allocator;
10const Allocator = mem.Allocator;
11const OsTag = std.Target.Os.Tag;10const OsTag = std.Target.Os.Tag;
1211
13var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){};
14const gpa = general_purpose_allocator.allocator();
15
16const Arch = enum {12const Arch = enum {
17 aarch64,13 aarch64,
18 x86_64,14 x86_64,
...@@ -67,10 +63,11 @@ const usage =...@@ -67,10 +63,11 @@ const usage =
67;63;
6864
69pub fn main(init: std.process.Init) !void {65pub fn main(init: std.process.Init) !void {
70 const allocator = init.arena;66 const io = init.io;
71 const args = try init.minimal.args.toSlice(allocator);67 const arena = init.arena.allocator();
68 const args = try init.minimal.args.toSlice(arena);
7269
73 var argv = std.array_list.Managed([]const u8).init(allocator);70 var argv = std.array_list.Managed([]const u8).init(arena);
74 var sysroot: ?[]const u8 = null;71 var sysroot: ?[]const u8 = null;
7572
76 var args_iter = ArgsIterator{ .args = args[1..] };73 var args_iter = ArgsIterator{ .args = args[1..] };
...@@ -82,23 +79,19 @@ pub fn main(init: std.process.Init) !void {...@@ -82,23 +79,19 @@ pub fn main(init: std.process.Init) !void {
82 } else try argv.append(arg);79 } else try argv.append(arg);
83 }80 }
8481
85 var threaded: Io.Threaded = .init(gpa, .{});
86 defer threaded.deinit();
87 const io = threaded.io();
88
89 const sysroot_path = sysroot orelse blk: {82 const sysroot_path = sysroot orelse blk: {
90 const target = try std.zig.system.resolveTargetQuery(io, .{});83 const target = try std.zig.system.resolveTargetQuery(io, .{});
91 break :blk std.zig.system.darwin.getSdk(allocator, io, &target) orelse84 break :blk std.zig.system.darwin.getSdk(arena, io, &target) orelse
92 fatal("no SDK found; you can provide one explicitly with '--sysroot' flag", .{});85 fatal("no SDK found; you can provide one explicitly with '--sysroot' flag", .{});
93 };86 };
9487
95 var sdk_dir = try Dir.cwd().openDir(io, sysroot_path, .{});88 var sdk_dir = try Dir.cwd().openDir(io, sysroot_path, .{});
96 defer sdk_dir.close(io);89 defer sdk_dir.close(io);
97 const sdk_info = try sdk_dir.readFileAlloc(io, "SDKSettings.json", allocator, .limited(std.math.maxInt(u32)));90 const sdk_info = try sdk_dir.readFileAlloc(io, "SDKSettings.json", arena, .limited(std.math.maxInt(u32)));
9891
99 const parsed_json = try std.json.parseFromSlice(struct {92 const parsed_json = try std.json.parseFromSlice(struct {
100 DefaultProperties: struct { MACOSX_DEPLOYMENT_TARGET: []const u8 },93 DefaultProperties: struct { MACOSX_DEPLOYMENT_TARGET: []const u8 },
101 }, allocator, sdk_info, .{ .ignore_unknown_fields = true });94 }, arena, sdk_info, .{ .ignore_unknown_fields = true });
10295
103 const version = Version.parse(parsed_json.value.DefaultProperties.MACOSX_DEPLOYMENT_TARGET) orelse96 const version = Version.parse(parsed_json.value.DefaultProperties.MACOSX_DEPLOYMENT_TARGET) orelse
104 fatal("don't know how to parse SDK version: {s}", .{97 fatal("don't know how to parse SDK version: {s}", .{
...@@ -114,7 +107,7 @@ pub fn main(init: std.process.Init) !void {...@@ -114,7 +107,7 @@ pub fn main(init: std.process.Init) !void {
114 .arch = arch,107 .arch = arch,
115 .os_ver = os_ver,108 .os_ver = os_ver,
116 };109 };
117 try fetchTarget(allocator, io, argv.items, sysroot_path, target, version, tmp_dir);110 try fetchTarget(arena, io, argv.items, sysroot_path, target, version, tmp_dir);
118 }111 }
119}112}
120113
tools/gen_macos_headers_c.zig+1-1
...@@ -14,7 +14,7 @@ const usage =...@@ -14,7 +14,7 @@ const usage =
14;14;
1515
16pub fn main(init: std.process.Init) !void {16pub fn main(init: std.process.Init) !void {
17 const arena = init.arena;17 const arena = init.arena.allocator();
18 const io = init.io;18 const io = init.io;
19 const args = try init.minimal.args.toSlice(arena);19 const args = try init.minimal.args.toSlice(arena);
2020
tools/process_headers.zig+24-26
...@@ -127,16 +127,14 @@ const LibCVendor = enum {...@@ -127,16 +127,14 @@ const LibCVendor = enum {
127 netbsd,127 netbsd,
128};128};
129129
130pub fn main() !void {130pub fn main(init: std.process.Init) !void {
131 var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);131 const arena = init.arena.allocator();
132 const allocator = arena.allocator();132 const io = init.io;
133133 const args = try init.minimal.args.toSlice(arena);
134 var threaded: Io.Threaded = .init(allocator, .{});134 const cwd_path = try std.process.getCwdAlloc(arena);
135 defer threaded.deinit();135 const env_map = init.env_map;
136 const io = threaded.io();136
137137 var search_paths = std.array_list.Managed([]const u8).init(arena);
138 const args = try std.process.argsAlloc(allocator);
139 var search_paths = std.array_list.Managed([]const u8).init(allocator);
140 var opt_out_dir: ?[]const u8 = null;138 var opt_out_dir: ?[]const u8 = null;
141 var opt_abi: ?[]const u8 = null;139 var opt_abi: ?[]const u8 = null;
142140
...@@ -172,7 +170,7 @@ pub fn main() !void {...@@ -172,7 +170,7 @@ pub fn main() !void {
172 usageAndExit(args[0]);170 usageAndExit(args[0]);
173 };171 };
174172
175 const generic_name = try std.fmt.allocPrint(allocator, "generic-{s}", .{abi_name});173 const generic_name = try std.fmt.allocPrint(arena, "generic-{s}", .{abi_name});
176 const libc_targets = switch (vendor) {174 const libc_targets = switch (vendor) {
177 .glibc => &glibc_targets,175 .glibc => &glibc_targets,
178 .musl => &musl_targets,176 .musl => &musl_targets,
...@@ -180,8 +178,8 @@ pub fn main() !void {...@@ -180,8 +178,8 @@ pub fn main() !void {
180 .netbsd => &netbsd_targets,178 .netbsd => &netbsd_targets,
181 };179 };
182180
183 var path_table = PathTable.init(allocator);181 var path_table = PathTable.init(arena);
184 var hash_to_contents = HashToContents.init(allocator);182 var hash_to_contents = HashToContents.init(arena);
185 var max_bytes_saved: usize = 0;183 var max_bytes_saved: usize = 0;
186 var total_bytes: usize = 0;184 var total_bytes: usize = 0;
187185
...@@ -189,7 +187,7 @@ pub fn main() !void {...@@ -189,7 +187,7 @@ pub fn main() !void {
189187
190 for (libc_targets) |libc_target| {188 for (libc_targets) |libc_target| {
191 const libc_dir = switch (vendor) {189 const libc_dir = switch (vendor) {
192 .glibc => try std.zig.target.glibcRuntimeTriple(allocator, libc_target.arch, .linux, libc_target.abi),190 .glibc => try std.zig.target.glibcRuntimeTriple(arena, libc_target.arch, .linux, libc_target.abi),
193 .musl => std.zig.target.muslArchName(libc_target.arch, libc_target.abi),191 .musl => std.zig.target.muslArchName(libc_target.arch, libc_target.abi),
194 .freebsd => switch (libc_target.arch) {192 .freebsd => switch (libc_target.arch) {
195 .arm => "armv7",193 .arm => "armv7",
...@@ -221,7 +219,7 @@ pub fn main() !void {...@@ -221,7 +219,7 @@ pub fn main() !void {
221 },219 },
222 };220 };
223221
224 const dest_target = if (libc_target.dest) |dest| dest else try std.fmt.allocPrint(allocator, "{s}-{s}-{s}", .{222 const dest_target = if (libc_target.dest) |dest| dest else try std.fmt.allocPrint(arena, "{s}-{s}-{s}", .{
225 @tagName(libc_target.arch),223 @tagName(libc_target.arch),
226 switch (vendor) {224 switch (vendor) {
227 .musl, .glibc => "linux",225 .musl, .glibc => "linux",
...@@ -239,8 +237,8 @@ pub fn main() !void {...@@ -239,8 +237,8 @@ pub fn main() !void {
239 => &[_][]const u8{ search_path, libc_dir, "usr", "include" },237 => &[_][]const u8{ search_path, libc_dir, "usr", "include" },
240 .musl => &[_][]const u8{ search_path, libc_dir, "usr", "local", "musl", "include" },238 .musl => &[_][]const u8{ search_path, libc_dir, "usr", "local", "musl", "include" },
241 };239 };
242 const target_include_dir = try Dir.path.join(allocator, sub_path);240 const target_include_dir = try Dir.path.join(arena, sub_path);
243 var dir_stack = std.array_list.Managed([]const u8).init(allocator);241 var dir_stack = std.array_list.Managed([]const u8).init(arena);
244 try dir_stack.append(target_include_dir);242 try dir_stack.append(target_include_dir);
245243
246 while (dir_stack.pop()) |full_dir_name| {244 while (dir_stack.pop()) |full_dir_name| {
...@@ -254,16 +252,16 @@ pub fn main() !void {...@@ -254,16 +252,16 @@ pub fn main() !void {
254 var dir_it = dir.iterate();252 var dir_it = dir.iterate();
255253
256 while (try dir_it.next(io)) |entry| {254 while (try dir_it.next(io)) |entry| {
257 const full_path = try Dir.path.join(allocator, &[_][]const u8{ full_dir_name, entry.name });255 const full_path = try Dir.path.join(arena, &[_][]const u8{ full_dir_name, entry.name });
258 switch (entry.kind) {256 switch (entry.kind) {
259 .directory => try dir_stack.append(full_path),257 .directory => try dir_stack.append(full_path),
260 .file, .sym_link => {258 .file, .sym_link => {
261 const rel_path = try Dir.path.relative(allocator, target_include_dir, full_path);259 const rel_path = try Dir.path.relative(arena, cwd_path, env_map, target_include_dir, full_path);
262 const max_size = 2 * 1024 * 1024 * 1024;260 const max_size = 2 * 1024 * 1024 * 1024;
263 const raw_bytes = try Dir.cwd().readFileAlloc(io, full_path, allocator, .limited(max_size));261 const raw_bytes = try Dir.cwd().readFileAlloc(io, full_path, arena, .limited(max_size));
264 const trimmed = std.mem.trim(u8, raw_bytes, " \r\n\t");262 const trimmed = std.mem.trim(u8, raw_bytes, " \r\n\t");
265 total_bytes += raw_bytes.len;263 total_bytes += raw_bytes.len;
266 const hash = try allocator.alloc(u8, 32);264 const hash = try arena.alloc(u8, 32);
267 hasher = Blake3.init(.{});265 hasher = Blake3.init(.{});
268 hasher.update(rel_path);266 hasher.update(rel_path);
269 hasher.update(trimmed);267 hasher.update(trimmed);
...@@ -285,8 +283,8 @@ pub fn main() !void {...@@ -285,8 +283,8 @@ pub fn main() !void {
285 }283 }
286 const path_gop = try path_table.getOrPut(rel_path);284 const path_gop = try path_table.getOrPut(rel_path);
287 const target_to_hash = if (path_gop.found_existing) path_gop.value_ptr.* else blk: {285 const target_to_hash = if (path_gop.found_existing) path_gop.value_ptr.* else blk: {
288 const ptr = try allocator.create(TargetToHash);286 const ptr = try arena.create(TargetToHash);
289 ptr.* = TargetToHash.init(allocator);287 ptr.* = TargetToHash.init(arena);
290 path_gop.value_ptr.* = ptr;288 path_gop.value_ptr.* = ptr;
291 break :blk ptr;289 break :blk ptr;
292 };290 };
...@@ -327,7 +325,7 @@ pub fn main() !void {...@@ -327,7 +325,7 @@ pub fn main() !void {
327 // gets their header in a separate arch directory.325 // gets their header in a separate arch directory.
328 var path_it = path_table.iterator();326 var path_it = path_table.iterator();
329 while (path_it.next()) |path_kv| {327 while (path_it.next()) |path_kv| {
330 var contents_list = std.array_list.Managed(*Contents).init(allocator);328 var contents_list = std.array_list.Managed(*Contents).init(arena);
331 {329 {
332 var hash_it = path_kv.value_ptr.*.iterator();330 var hash_it = path_kv.value_ptr.*.iterator();
333 while (hash_it.next()) |hash_kv| {331 while (hash_it.next()) |hash_kv| {
...@@ -339,7 +337,7 @@ pub fn main() !void {...@@ -339,7 +337,7 @@ pub fn main() !void {
339 const best_contents = contents_list.pop().?;337 const best_contents = contents_list.pop().?;
340 if (best_contents.hit_count > 1) {338 if (best_contents.hit_count > 1) {
341 // worth it to make it generic339 // worth it to make it generic
342 const full_path = try Dir.path.join(allocator, &[_][]const u8{ out_dir, generic_name, path_kv.key_ptr.* });340 const full_path = try Dir.path.join(arena, &[_][]const u8{ out_dir, generic_name, path_kv.key_ptr.* });
343 try Dir.cwd().createDirPath(io, Dir.path.dirname(full_path).?);341 try Dir.cwd().createDirPath(io, Dir.path.dirname(full_path).?);
344 try Dir.cwd().writeFile(io, .{ .sub_path = full_path, .data = best_contents.bytes });342 try Dir.cwd().writeFile(io, .{ .sub_path = full_path, .data = best_contents.bytes });
345 best_contents.is_generic = true;343 best_contents.is_generic = true;
...@@ -360,7 +358,7 @@ pub fn main() !void {...@@ -360,7 +358,7 @@ pub fn main() !void {
360 if (contents.is_generic) continue;358 if (contents.is_generic) continue;
361359
362 const dest_target = hash_kv.key_ptr.*;360 const dest_target = hash_kv.key_ptr.*;
363 const full_path = try Dir.path.join(allocator, &[_][]const u8{ out_dir, dest_target, path_kv.key_ptr.* });361 const full_path = try Dir.path.join(arena, &[_][]const u8{ out_dir, dest_target, path_kv.key_ptr.* });
364 try Dir.cwd().createDirPath(io, Dir.path.dirname(full_path).?);362 try Dir.cwd().createDirPath(io, Dir.path.dirname(full_path).?);
365 try Dir.cwd().writeFile(io, .{ .sub_path = full_path, .data = contents.bytes });363 try Dir.cwd().writeFile(io, .{ .sub_path = full_path, .data = contents.bytes });
366 }364 }