Added File Tree contextual menu (Add to Playlist, Show in Finder, etc.). File Tree and additions to play list now use Finder sort order. File Tree Root can be set via its popup menu or drag and drop from File Tree. Alias names are now shown in File Tree (aliases are still resolved). Added option to skip reading of cue sheets when adding a folder to play list.
37 lines
705 B
Objective-C
37 lines
705 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(finderCompare:)];
|
|
NSMutableArray *fullPaths = [[NSMutableArray alloc] init];
|
|
|
|
for (NSString *s in contents)
|
|
{
|
|
if (![s hasPrefix:@"."])
|
|
[fullPaths addObject:[[url path] stringByAppendingPathComponent: s]];
|
|
}
|
|
|
|
[self processPaths: fullPaths];
|
|
|
|
[fullPaths release];
|
|
}
|
|
|
|
@end
|