extern struct inotify_event [src]

Fields

wd: i32
mask: u32
cookie: u32
len: u32

Members

Source

pub const inotify_event = extern struct { wd: i32, mask: u32, cookie: u32, len: u32, //name: [?]u8, // if an event is returned for a directory or file inside the directory being watched // returns the name of said directory/file // returns `null` if the directory/file is the one being watched pub fn getName(self: *const inotify_event) ?[:0]const u8 { if (self.len == 0) return null; return std.mem.span(@as([*:0]const u8, @ptrCast(self)) + @sizeOf(inotify_event)); } }