From c6cc82e302b6829b10eaa9b21495bc776e1c73d3 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sun, 28 Dec 2025 22:17:39 -0800 Subject: [PATCH] Dir: add makeDir --- Dir.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dir.zig b/Dir.zig index 281a2b606169d112c6df9c2db56cdfa0eb73cdad..0db9270531c7850b5847a36bebe5753995529ae0 100644 --- a/Dir.zig +++ b/Dir.zig @@ -53,3 +53,8 @@ pub fn readFileAlloc(self: Dir, allocator: std.mem.Allocator, file_path: [:0]con const stat_size = std.math.cast(usize, try file.getEndPos()) orelse return error.FileTooBig; return file.readToEndAlloc(allocator, max_bytes, stat_size); } + +pub fn makeDir(self: Dir, sub_path: [:0]const u8) !void { + if (os == .linux) + try sys_linux.mkdirat(@intFromEnum(self.fd), sub_path, 0o755); +} -- 2.54.0