Re: What is the fastest way to find out if a file inside folder package?
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