cog/FileDrawer/DirectoryNode.m

40 lines
729 B
Matlab
Raw Normal View History

2006-09-02 16:09:20 +00:00
//
// DirectoryNode.m
// Cog
//
// Created by Vincent Spader on 8/20/2006.
// Copyright 2006 Vincent Spader. All rights reserved.
//
#import "DirectoryNode.h"
2006-09-02 16:09:20 +00:00
#import "FileNode.h"
#import "SmartFolderNode.h"
2006-09-02 16:09:20 +00:00
#import "FileTreeController.h"
#import "FileTreeWatcher.h"
@implementation DirectoryNode
2006-09-02 16:09:20 +00:00
- (BOOL)isLeaf
{
return NO;
}
- (NSArray *)subpaths
{
if (subpaths == nil)
{
subpaths = [[NSMutableArray alloc] init];
NSArray *contents = [[[NSFileManager defaultManager] directoryContentsAtPath:path] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
NSLog(@"Contents: %@", contents);
[self processPaths: contents];
// [[controller watcher] addPath:[self path]];
2006-09-02 16:09:20 +00:00
}
return subpaths;
}
@end