cog/FileDrawer/PathIcon.m

45 lines
544 B
Matlab
Raw Normal View History

2006-09-02 16:09:20 +00:00
//
// FileIcon.m
// Cog
//
// 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;
}
- (void)dealloc
{
[path release];
[icon release];
}
2006-09-02 16:09:20 +00:00
- (NSString *) path
{
return path;
}
- (NSImage *) icon
{
return icon;
}
@end