| author | |
| committer | |
| log | c6cc82e302b6829b10eaa9b21495bc776e1c73d3 |
| tree | ec3ef84d3d59d210975fd43e29d58fddf5016ad1 |
| parent | 4b6221922db6e8c9f252a816abc2cd75374304d6 |
1 files changed, 5 insertions(+), 0 deletions(-)
Dir.zig+5| ... | ... | @@ -53,3 +53,8 @@ pub fn readFileAlloc(self: Dir, allocator: std.mem.Allocator, file_path: [:0]con |
| 53 | 53 | const stat_size = std.math.cast(usize, try file.getEndPos()) orelse return error.FileTooBig; |
| 54 | 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 | } |