KSTFileWatcher
@interface KSTFileWatcher : NSObject
KSTFileWatcher wraps the GCD APIs related to the kqueue file notification mechanism.
-
Get the file URLs that are being watched.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSArray<NSURL *> *_Nonnull URLs; -
Get the flags passed in during creation.
Declaration
Objective-C
@property (nonatomic, readonly) KSTFileWatcherFlags flags; -
Returns
[self initWithURLs:URLs flags:KSTFileWatcherFlagsAll block:block].Declaration
Objective-C
- (nonnull instancetype)initWithURLs:(nonnull NSArray<NSURL *> *)URLs block:(nonnull KSTFileWatcherBlock)block;Parameters
URLsThe file/directory URLs to watch
blockThe block to invoke when an event occurs
Return Value
The initialized instance
-
Creates and returns an instance of the receiver to watch the provided file/directory URLs and invoke the provided block whenever an event occurs. The provided block is always invoked on a private background queue.
Declaration
Objective-C
- (nonnull instancetype)initWithURLs:(nonnull NSArray<NSURL *> *)URLs flags:(KSTFileWatcherFlags)flags block:(nonnull KSTFileWatcherBlock)block;Parameters
URLsThe file/directory URLs to watch
flagsThe flags determining when to generate events
blockThe block to invoke when an event occurs
Return Value
The initialized instance
-
Unavailable
Undocumented
Declaration
Objective-C
+ (instancetype)new NS_UNAVAILABLE; -
Unavailable
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
KSTFileWatcher Class Reference