Cog/FileTree/DirectoryNode.m

38 lines
705 B
Mathematica
Raw Normal View History

2006-09-02 12:09:20 -04: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 12:09:20 -04:00
#import "FileNode.h"
#import "SmartFolderNode.h"
2006-09-02 12:09:20 -04:00
@implementation DirectoryNode
2006-09-02 12:09:20 -04:00
- (BOOL)isLeaf
{
return NO;
}
- (void)updatePath
{
NSArray *contents = [[[NSFileManager defaultManager] directoryContentsAtPath:[url path]] sortedArrayUsingSelector:@selector(finderCompare:)];
2007-10-15 20:18:58 -03:00
NSMutableArray *fullPaths = [[NSMutableArray alloc] init];
for (NSString *s in contents)
2007-10-15 20:18:58 -03:00
{
2008-03-12 21:55:37 -03:00
if (![s hasPrefix:@"."])
[fullPaths addObject:[[url path] stringByAppendingPathComponent: s]];
2007-10-15 20:18:58 -03:00
}
2007-10-15 20:18:58 -03:00
[self processPaths: fullPaths];
[fullPaths release];
2006-09-02 12:09:20 -04:00
}
@end