• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: File association using file magic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File association using file magic


  • Subject: Re: File association using file magic
  • From: Charles Srstka <email@hidden>
  • Date: Thu, 23 Jan 2014 16:07:58 -0600

On Jan 22, 2014, at 8:33 AM, Remco Poelstra <email@hidden> wrote:

> I'm writing an app which has to import files without a fixed file extension. There are about 10 different commonly used file extensions around.
> Is it possible to associate a file to my app based on the file contents? Much like how file (1) determines a file's type?
> Or should I simply register all know file extensions?

Is this a standard type that just happens to have multiple filename extensions associated with it (like .jpg and .jpeg for JPEG files)? If so, there might be a UTI for that type, which you can just register for instead of registering for the filename extension directly.

If the type has no existing UTI (for example, if it's a type specific to your app), you can define your own UTI for it, and list the file extensions it uses in the UTI definition.

Charles

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >File association using file magic (From: Remco Poelstra <email@hidden>)

  • Prev by Date: NSDocument fileURL
  • Next by Date: Re: NSDocument fileURL
  • Previous by thread: Re: File association using file magic
  • Next by thread: Re: File association using file magic
  • Index(es):
    • Date
    • Thread