• 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: Type of NSData contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Type of NSData contents


  • Subject: Re: Type of NSData contents
  • From: Jens Alfke <email@hidden>
  • Date: Sat, 12 Jun 2010 12:25:50 -0700

On Jun 12, 2010, at 5:18 AM, Ben wrote:

> Given an NSData object, with no context as to what it might be, is it possible to find if it contains a document of recognised file type?

Honestly, the best option I can think of is to use NSTask to run /usr/bin/file. Or look up the source code of that tool on the Apple open-source site and build it into your app.

—Jens_______________________________________________

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: 
 >Type of NSData contents (From: Ben <email@hidden>)

  • Prev by Date: userDefaultsDidChange is causing a loop with dependent checkbox values
  • Next by Date: Interference of a variable name with Interface Builder
  • Previous by thread: Re: Type of NSData contents
  • Next by thread: userDefaultsDidChange is causing a loop with dependent checkbox values
  • Index(es):
    • Date
    • Thread