• 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
One-liner to check existence of image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

One-liner to check existence of image


  • Subject: One-liner to check existence of image
  • From: Gabriel Zachmann <email@hidden>
  • Date: Mon, 28 Sep 2009 12:26:56 +0200

I seem to remember having seem some code that checked with a one-liner whether a file path is an image that could be loaded by NSImage's initWithContentsOfFile:, before actually going ahead and doing the initWithContentsOfFile:

Now, I can't remember that one-liner, and I don't see why I couldn't just do a initWithContentsOfFile, and then check whether it returned nil.

Any comments and insights will be appreciated.

Best regards,
Gabriel.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: One-liner to check existence of image
      • From: Dave Keck <email@hidden>
  • Prev by Date: Re: Run Javascript Function From Objective-C.
  • Next by Date: Re: how do i make SecKeyRef object from NSData of publicKey value
  • Previous by thread: Stopping ODQuery (OpenDirectory Framework) takes a long time (unusable)
  • Next by thread: Re: One-liner to check existence of image
  • Index(es):
    • Date
    • Thread