• 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
Testing if a folder is a bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Testing if a folder is a bundle


  • Subject: Testing if a folder is a bundle
  • From: Chris Boot <email@hidden>
  • Date: Sun, 26 Aug 2001 19:39:04 +0200

Hi,

I've been trying to programmatically test whether a certain folder is a
bundle, with no success. I've tried creating a CFBundleRef from an NSURL
(I'm writing a Cocoa app) cast to a CFURLRef (this is valid), but
CFBundleCreate just happily creates bundles for folders which quite
obviously are NOT bundles. I've also tried getting the folder's finder
flags and testing for the bundle bit (which works on Mac OS 9, AFAIK), but
that doesn't work.

Is there a way of programmatically telling whether a folder should be
treated like a file? How does the Finder do it?

This is all on Mac OS X, BTW.

Thanks for any pointers.

--
Chris Boot
email@hidden

#define QUESTION ((2b) || (!2b))


  • Follow-Ups:
    • Re: Testing if a folder is a bundle
      • From: Douglas Davidson <email@hidden>
    • Re: Testing if a folder is a bundle
      • From: Andreas Monitzer <email@hidden>
  • Prev by Date: Re: Docs, questions and stuff
  • Next by Date: Re: Another way to set the system time zone???
  • Previous by thread: Re: cocoa-dev digest, Vol 1 #468 - 14 msgs
  • Next by thread: Re: Testing if a folder is a bundle
  • Index(es):
    • Date
    • Thread