Cog/FileTree/PathNode.h
Christopher Snowhill 3d1be2ca0d [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:41:38 -07:00

53 lines
924 B
Objective-C

//
// Node.h
// Cog
//
// Created by Vincent Spader on 8/20/2006.
// Copyright 2006 Vincent Spader. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class FileTreeDataSource;
@interface PathNode : NSObject {
FileTreeDataSource *dataSource;
NSURL *url;
NSString *display; // The pretty path to display.
NSString *lastPathComponent;
NSImage *icon;
NSArray *subpaths;
NSMutableDictionary *subpathsLookup;
}
- (id)initWithDataSource:(FileTreeDataSource *)ds url:(NSURL *)u;
- (NSURL *)URL;
- (void)setURL:(NSURL *)url;
- (void)processPaths:(NSArray *)contents;
- (NSArray *)subpaths;
- (void)setSubpaths:(NSArray *)s;
- (NSString *)display;
- (void)setDisplay:(NSString *)s;
- (NSString *)lastPathComponent;
- (void)setLastPathComponent:(NSString *)s;
- (NSDictionary *)subpathsLookup;
- (void)setSubpathsLookup:(NSMutableDictionary *)d;
- (NSImage *)icon;
- (BOOL)isLeaf;
- (void)updatePath;
@end