38 lines
744 B
Matlab
38 lines
744 B
Matlab
|
//
|
||
|
// 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];
|
||
|
NSString *s;
|
||
|
NSEnumerator *e = [contents objectEnumerator];
|
||
|
while (s = [e nextObject])
|
||
|
{
|
||
|
[fullPaths addObject:[[url path] stringByAppendingPathComponent: s]];
|
||
|
}
|
||
|
|
||
|
[self processPaths: fullPaths];
|
||
|
|
||
|
[fullPaths release];
|
||
|
}
|
||
|
|
||
|
@end
|