[solved, really!] Re: Human readable file type?
[solved, really!] Re: Human readable file type?
- Subject: [solved, really!] Re: Human readable file type?
- From: Allan Odgaard <email@hidden>
- Date: Sun, 7 Jul 2002 17:29:43 +0200
On sxndag, juli 7, 2002, at 04:43 , Allan Odgaard wrote:
I need to display a human readable filetype, similar to how the "Show
Info" of the Finder does (e.g. "MP3 Audio File").
Okay, with the help of Nicholas Riley, the revised function looks like
this:
- (NSString *)humanReadableFiletype:(NSString *)path
{
NSString *res;
FSRef fileRef;
FSPathMakeRef([path fileSystemRepresentation], &fileRef, NULL);
LSCopyKindStringForRef(&fileRef, (CFStringRef *)&res);
return [res autorelease];
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.