• 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: What is the fastest way to find out if a file inside folder package?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the fastest way to find out if a file inside folder package?


  • Subject: Re: What is the fastest way to find out if a file inside folder package?
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 20 Jun 2008 14:29:48 -0700


On 20 Jun '08, at 10:36 AM, Gurami Palagashvili wrote:

I need to find out if an arbitrary file/folder inside of folder package.
I could walk up on folder hierarchy and check if parent folder is
package using Launch Service call LSCopyItemInfoForRef.
I'm looking for any other more efficient way to do that.

In *most* cases, you could get the path to the file and see whether it contains a component named "Contents". But I believe the newish "shallow bundle" format doesn't use a "Contents" subdirectory.


There might be a way that you can ask Launch Services for all the registered filename extensions that denote packages? Then you'd just have to do that once, and compare the components of the path against it. (You'd want to update the cache once in a while, in case the user installs a new app, though.)

—Jens

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

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

This email sent to email@hidden

References: 
 >What is the fastest way to find out if a file inside folder package? (From: "Gurami Palagashvili" <email@hidden>)

  • Prev by Date: What is the fastest way to find out if a file inside folder package?
  • Previous by thread: What is the fastest way to find out if a file inside folder package?
  • Index(es):
    • Date
    • Thread