Added some new utilities, taken from Murky.
2 // MYDirectoryWatcher.h
5 // Copyright 2008 Jens Alfke. All rights reserved.
8 #import <Cocoa/Cocoa.h>
11 /* A wrapper for FSEvents, which notifies its delegate when filesystem changes occur. */
12 @interface MYDirectoryWatcher : NSObject
19 CFTimeInterval _latency;
20 FSEventStreamRef _stream;
23 - (id) initWithDirectory: (NSString*)path target: (id)target action: (SEL)action;
25 @property (readonly,nonatomic) NSString* path;
27 @property UInt64 lastEventID;
28 @property CFTimeInterval latency;
33 - (void) stopTemporarily; // stop, but re-start on next runloop cycle
39 @interface MYDirectoryEvent : NSObject
41 MYDirectoryWatcher *watcher;
47 @property (readonly, nonatomic) MYDirectoryWatcher *watcher;
48 @property (readonly, nonatomic) NSString *path, *relativePath;
49 @property (readonly, nonatomic) UInt64 eventID;
50 @property (readonly, nonatomic) UInt32 flags;
52 @property (readonly, nonatomic) BOOL mustScanSubdirectories;
53 @property (readonly, nonatomic) BOOL eventsWereDropped;
54 @property (readonly, nonatomic) BOOL isHistorical;
55 @property (readonly, nonatomic) BOOL rootChanged;