| ... | @@ -53,3 +53,8 @@ pub fn readFileAlloc(self: Dir, allocator: std.mem.Allocator, file_path: [:0]con | ... | @@ -53,3 +53,8 @@ pub fn readFileAlloc(self: Dir, allocator: std.mem.Allocator, file_path: [:0]con |
| 53 | const stat_size = std.math.cast(usize, try file.getEndPos()) orelse return error.FileTooBig; | 53 | const stat_size = std.math.cast(usize, try file.getEndPos()) orelse return error.FileTooBig; |
| 54 | return file.readToEndAlloc(allocator, max_bytes, stat_size); | 54 | return file.readToEndAlloc(allocator, max_bytes, stat_size); |
| 55 | } | 55 | } |
| | 56 | |
| | 57 | pub fn makeDir(self: Dir, sub_path: [:0]const u8) !void { |
| | 58 | if (os == .linux) |
| | 59 | try sys_linux.mkdirat(@intFromEnum(self.fd), sub_path, 0o755); |
| | 60 | } |