I'm attempting to write a Swift wrapper for inotify, and I need to read the name out of a struct which is defined like so:
/* Structure describing an inotify event. */
struct inotify_event
{
int wd;
uint32_t mask;
uint32_t cookie;
uint32_t len;
char name __flexarr;
};
The problem is, when I try to access this name
field from Swift, it does not appear to exist in the Swift view of this struct:
error: value of type 'inotify_event' has no member 'name'
print("\t \(String(cString: event.name))")
How can I access it?