2006-09-02 16:09:20 +00:00
|
|
|
//
|
|
|
|
// FileIcon.m
|
|
|
|
// Cog
|
|
|
|
//
|
2006-09-04 18:46:18 +00:00
|
|
|
// Created by Vincent Spader on 8/20/06.
|
|
|
|
// Copyright 2006 Vincent Spader. All rights reserved.
|
2006-09-02 16:09:20 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#import "PathIcon.h"
|
|
|
|
|
|
|
|
|
|
|
|
@implementation PathIcon
|
|
|
|
|
|
|
|
-(id)initWithPath:(NSString *)p
|
|
|
|
{
|
|
|
|
self = [super init];
|
|
|
|
if (self)
|
|
|
|
{
|
|
|
|
path = [p retain];
|
|
|
|
icon = [[[NSWorkspace sharedWorkspace] iconForFile:path] retain];
|
|
|
|
|
|
|
|
[icon setSize: NSMakeSize(16.0, 16.0)];
|
|
|
|
}
|
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2006-09-17 18:11:29 +00:00
|
|
|
- (void)dealloc
|
|
|
|
{
|
|
|
|
[path release];
|
|
|
|
[icon release];
|
|
|
|
}
|
|
|
|
|
2006-09-02 16:09:20 +00:00
|
|
|
- (NSString *) path
|
|
|
|
{
|
|
|
|
return path;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (NSImage *) icon
|
|
|
|
{
|
|
|
|
return icon;
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|