Skip to content

Instantly share code, notes, and snippets.

@nielsbot
nielsbot / gist:5155671
Last active April 2, 2022 08:07
A wrapper around kqueue to monitor changes to files. Works on iOS.
#import "FileChangeObserver.h"
#undef Assert
#define Assert(COND) { if (!(COND)) { raise( SIGINT ) ; } }
@interface FileChangeObserver ()
@property ( nonatomic, readonly ) int kqueue ;
@property ( nonatomic ) enum FileChangeNotificationType typeMask ;
@end