| ... | ... | @@ -3615,6 +3615,14 @@ pub const inotify_event = extern struct { |
| 3615 | 3615 | cookie: u32, |
| 3616 | 3616 | len: u32, |
| 3617 | 3617 | //name: [?]u8, |
| 3618 | |
| 3619 | // if an event is returned for a directory or file inside the directory being watched |
| 3620 | // returns the name of said directory/file |
| 3621 | // returns `null` if the directory/file is the one being watched |
| 3622 | pub fn getName(self: *const inotify_event) ?[:0]const u8 { |
| 3623 | if (self.len == 0) return null; |
| 3624 | return std.mem.sliceTo(@as([*:0]const u8, @ptrCast(self)) + @sizeOf(inotify_event), 0); |
| 3625 | } |
| 3618 | 3626 | }; |
| 3619 | 3627 | |
| 3620 | 3628 | pub const dirent64 = extern struct { |