Cog/FileTree/PathWatcher.h
Christopher Snowhill da053d7282 [File Tree] Significantly improve the watcher
- Switch to fine grained folder and file watching responses
- Navigate the PathNode tree using a fast dictionary of path components
- Quickly refresh the file tree by locating parent nodes to refresh

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-06 22:39:47 -07:00

30 lines
562 B
Objective-C

//
// PathWatcher.h
// Cog
//
// Created by Vincent Spader on 2/17/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#include <CoreServices/CoreServices.h>
@interface PathWatcher : NSObject {
FSEventStreamRef stream;
FSEventStreamContext *context;
IBOutlet id delegate;
}
- (void)setDelegate:(id)d;
- (id)delegate;
- (void)setPath:(NSString *)path; // Set the path to watch
- (void)cleanUp;
@end
@protocol PathWatcherDelegate
- (void)pathDidChange:(NSString *)path flags:(FSEventStreamEventFlags)flags;
@end