motiejus/zig

fork of https://codeberg.org/ziglang/zig
git clone https://git.jakstys.lt/motiejus/zig.git
Log | Tree | Refs | README | LICENSE

commit fb5f69a55283e65a8ae9508e74b9eefedc3ac3da (tree)
parent 63b504219d119a13731811065d18a2b10b4214b3
Author: Ryan Liptak <squeek502@hotmail.com>
Date:   Thu, 27 Jul 2023 13:57:41 -0700

Improve Dir.makePath and Dir.makeOpenPathAccessMaskW doc comments

These are not recursive functions, so 'recursively' could be misleading.

Diffstat:
Mlib/std/fs.zig | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/std/fs.zig b/lib/std/fs.zig @@ -1459,8 +1459,9 @@ pub const Dir = struct { try os.mkdiratW(self.fd, sub_path, default_new_dir_mode); } - /// Calls makeDir recursively to make an entire path. Returns success if the path - /// already exists and is a directory. + /// Calls makeDir iteratively to make an entire path + /// (i.e. creating any parent directories that do not exist). + /// Returns success if the path already exists and is a directory. /// This function is not atomic, and if it returns an error, the file system may /// have been modified regardless. pub fn makePath(self: Dir, sub_path: []const u8) !void { @@ -1483,9 +1484,9 @@ pub const Dir = struct { } } - /// Calls makeOpenDirAccessMaskW recursively to make an entire path - /// (i.e. falling back if the parent directory does not exist). Opens the dir if the path - /// already exists and is a directory. + /// Calls makeOpenDirAccessMaskW iteratively to make an entire path + /// (i.e. creating any parent directories that do not exist). + /// Opens the dir if the path already exists and is a directory. /// This function is not atomic, and if it returns an error, the file system may /// have been modified regardless. fn makeOpenPathAccessMaskW(self: Dir, sub_path: []const u8, access_mask: u32, no_follow: bool) OpenError!Dir {