Re: MIME types?
Re: MIME types?
- Subject: Re: MIME types?
- From: email@hidden (Simon Fraser)
- Date: Tue, 06 May 2003 10:57:36 -0700
Sherm Pendley wrote:
On Sunday, May 4, 2003, at 04:44 PM, petite_abeille wrote:
Is there a standard way to get a MIME type for a given file?
NSFileManager.fileAttributesAtPath:traverseLink: doesn't seem to
return any MIME information :(
Any straightforward alternatives?
It's a hack, but since Apache comes with every copy of OS X, you could
use it's mime.types file. That's just a simple text file with a list of
types and filename extensions.
/private/etc/httpd/mime.types
That's not an ideal way to solve this problem. There's a hole in
the APIs here. Hopefully, Apple will add a LaunchServices API method
to get the MIME type for a file. For now, you'll have to use the
deprecated Internet Config API.
Simon
_______________________________________________
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.