Skip to content

Instantly share code, notes, and snippets.

@nielsbot
nielsbot / gist:5155671
Last active January 16, 2025 12:46
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