authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2020-01-15 18:09:10+10:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-03 13:25:43-05:00
logdfb420e6d779b9b6d60a277401aadba2800e3572
tree663a095aa58134f8bb1c482c93084793352ce951
parent88e27f01c8dbf4bda5726c93d12cc4a1d174989d
signature Commit is signed but in an unrecognized format.

std: add fs.Dir.makeDir


1 files changed, 8 insertions(+), 0 deletions(-)

lib/std/fs.zig+8
......@@ -882,6 +882,14 @@ pub const Dir = struct {
882882 }
883883 }
884884
885 pub fn makeDir(self: Dir, sub_path: []const u8) !void {
886 try os.mkdirat(self.fd, sub_path, default_new_dir_mode);
887 }
888
889 pub fn makeDirC(self: Dir, sub_path: [*:0]const u8) !void {
890 try os.mkdiratC(self.fd, sub_path, default_new_dir_mode);
891 }
892
885893 /// Deprecated; call `openDirList` directly.
886894 pub fn openDir(self: Dir, sub_path: []const u8) OpenError!Dir {
887895 return self.openDirList(sub_path);