cog/FileTreeWindow/DirectoryNode.m

37 lines
686 B
Objective-C

//
// DirectoryNode.m
// Cog
//
// Created by Vincent Spader on 8/20/2006.
// Copyright 2006 Vincent Spader. All rights reserved.
//
#import "DirectoryNode.h"
#import "FileNode.h"
#import "SmartFolderNode.h"
@implementation DirectoryNode
- (BOOL)isLeaf
{
return NO;
}
- (void)updatePath
{
NSArray *contents = [[[NSFileManager defaultManager] directoryContentsAtPath:[url path]] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
NSMutableArray *fullPaths = [[NSMutableArray alloc] init];
for (NSString *s in contents)
{
[fullPaths addObject:[[url path] stringByAppendingPathComponent: s]];
}
[self processPaths: fullPaths];
[fullPaths release];
}
@end