Skip to content

Commit

Permalink
Improve Dir.makePath and Dir.makeOpenPathAccessMaskW doc comments
Browse files Browse the repository at this point in the history
These are not recursive functions, so 'recursively' could be misleading.
  • Loading branch information
squeek502 authored and andrewrk committed Oct 19, 2023
1 parent 4484f28 commit 595f1f1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/std/fs.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 595f1f1

Please sign in to comment.