• 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
How to detect that a directory is a package file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to detect that a directory is a package file


  • Subject: How to detect that a directory is a package file
  • From: Doug Knowles <email@hidden>
  • Date: Sun, 18 Dec 2005 18:44:39 -0500

I'm playing with an application that scans the files in a directory tree.

At the moment, I'm using fileExistsAtPath:isDirectory to examine the
file at a particular path, but the "isDirectory" part returns YES for
package files (.app, .pages, etc.).

I fear that the answer to this is excruciatingly simple, but how do a
know whether a directory is a folder, or one of the "opaque" file
packages that the Finder, for example, knows to present as a leaf node
in the directory tree? I stumbled across some documentation that the
Finder does this in part by recognizing extensions, but I hope that's
not true (or that there's an API where I can use the same knowledge).

TIA,
Doug Knowles
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to detect that a directory is a package file
      • From: Ryan Britton <email@hidden>
  • Prev by Date: Re: Exporting to Grapher
  • Next by Date: Re: How to detect that a directory is a package file
  • Previous by thread: Setting up UTI and MIME types for Cocoa app
  • Next by thread: Re: How to detect that a directory is a package file
  • Index(es):
    • Date
    • Thread