std: add fs.Dir.makeDir
parent
88e27f01c8
commit
dfb420e6d7
|
@ -882,6 +882,14 @@ pub const Dir = struct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn makeDir(self: Dir, sub_path: []const u8) !void {
|
||||||
|
try os.mkdirat(self.fd, sub_path, default_new_dir_mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn makeDirC(self: Dir, sub_path: [*:0]const u8) !void {
|
||||||
|
try os.mkdiratC(self.fd, sub_path, default_new_dir_mode);
|
||||||
|
}
|
||||||
|
|
||||||
/// Deprecated; call `openDirList` directly.
|
/// Deprecated; call `openDirList` directly.
|
||||||
pub fn openDir(self: Dir, sub_path: []const u8) OpenError!Dir {
|
pub fn openDir(self: Dir, sub_path: []const u8) OpenError!Dir {
|
||||||
return self.openDirList(sub_path);
|
return self.openDirList(sub_path);
|
||||||
|
|
Loading…
Reference in New Issue