authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2021-06-23 17:22:34-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-07-21 12:25:05-07:00
logba47e0937321d2371875fbc3d8cecbd9bfe407b1
tree78af4b4fa72415dfeb83ba4d1075b6a4a69d736f
parent1063bf696ed27d58d0c869f7b1f663a6c68b68c1

Add NotDir as possible error for os.inotify_add_watch

Possible when "mask contains IN_ONLYDIR and pathname is not a directory."

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

lib/std/os.zig+2
...@@ -3652,6 +3652,7 @@ pub const INotifyAddWatchError = error{...@@ -3652,6 +3652,7 @@ pub const INotifyAddWatchError = error{
3652 FileNotFound,3652 FileNotFound,
3653 SystemResources,3653 SystemResources,
3654 UserResourceLimitReached,3654 UserResourceLimitReached,
3655 NotDir,
3655} || UnexpectedError;3656} || UnexpectedError;
36563657
3657/// add a watch to an initialized inotify instance3658/// add a watch to an initialized inotify instance
...@@ -3675,6 +3676,7 @@ pub fn inotify_add_watchZ(inotify_fd: i32, pathname: [*:0]const u8, mask: u32) I...@@ -3675,6 +3676,7 @@ pub fn inotify_add_watchZ(inotify_fd: i32, pathname: [*:0]const u8, mask: u32) I
3675 ENOENT => return error.FileNotFound,3676 ENOENT => return error.FileNotFound,
3676 ENOMEM => return error.SystemResources,3677 ENOMEM => return error.SystemResources,
3677 ENOSPC => return error.UserResourceLimitReached,3678 ENOSPC => return error.UserResourceLimitReached,
3679 ENOTDIR => return error.NotDir,
3678 else => |err| return unexpectedErrno(err),3680 else => |err| return unexpectedErrno(err),
3679 }3681 }
3680}3682}