| author | |
| committer | |
| log | 1a1b7a3afdd3edac9e8e351ce7e21c91404f8307 |
| tree | 5d6132c8a0fcacf702bf3804755e49349bbd4d91 |
| parent | 075f93fa108030fb0dd12faa6e389ace302cfb4c |
From https://man7.org/linux/man-pages/man7/inotify.7.html
> **IN_MASK_CREATE** (since Linux 4.18)
>
> Watch pathname only if it does not already have a watch associated with it; the error EEXIST results if pathname is already being watched.2 files changed, 3 insertions(+), 0 deletions(-)
lib/std/os.zig+2| ... | ... | @@ -4244,6 +4244,7 @@ pub const INotifyAddWatchError = error{ |
| 4244 | 4244 | SystemResources, |
| 4245 | 4245 | UserResourceLimitReached, |
| 4246 | 4246 | NotDir, |
| 4247 | WatchAlreadyExists, | |
| 4247 | 4248 | } || UnexpectedError; |
| 4248 | 4249 | |
| 4249 | 4250 | /// add a watch to an initialized inotify instance |
| ... | ... | @@ -4266,6 +4267,7 @@ pub fn inotify_add_watchZ(inotify_fd: i32, pathname: [*:0]const u8, mask: u32) I |
| 4266 | 4267 | .NOMEM => return error.SystemResources, |
| 4267 | 4268 | .NOSPC => return error.UserResourceLimitReached, |
| 4268 | 4269 | .NOTDIR => return error.NotDir, |
| 4270 | .EXIST => return error.WatchAlreadyExists, | |
| 4269 | 4271 | else => |err| return unexpectedErrno(err), |
| 4270 | 4272 | } |
| 4271 | 4273 | } |
lib/std/os/linux.zig+1| ... | ... | @@ -2976,6 +2976,7 @@ pub const IN = struct { |
| 2976 | 2976 | pub const ONLYDIR = 0x01000000; |
| 2977 | 2977 | pub const DONT_FOLLOW = 0x02000000; |
| 2978 | 2978 | pub const EXCL_UNLINK = 0x04000000; |
| 2979 | pub const MASK_CREATE = 0x10000000; | |
| 2979 | 2980 | pub const MASK_ADD = 0x20000000; |
| 2980 | 2981 | |
| 2981 | 2982 | pub const ISDIR = 0x40000000; |