Re: Finding other apps' paths - deterministically!
Re: Finding other apps' paths - deterministically!
- Subject: Re: Finding other apps' paths - deterministically!
- From: Jerry Krinock <email@hidden>
- Date: Tue, 30 Sep 2008 10:00:04 -0700
Michael Ash wrote:
For the original problem, I'd recommend using something like
LSCopyApplicationURLsForURL() if it's at all possible.
Good idea but I'm looking for a helper app which is not registered to
open any URLs. Also, I don't see any indication that
LSCopyApplicationURLsForURL() would return multiple installations of
the same app.
If you must search the disk, use Spotlight if you can. ... The
downside is that it won't work if indexing is disabled or if the
desired application is in an
excluded directory.
Also, it seems to not find helper applications which are inside other
applications' packages.
On 2008 Sep, 21, at 15:08, Michael Ash wrote:
On my system, the number of processes per user is set at 266, and this
appears to be a hard limit. That limit is *extremely* easy to
reach ...
Amen. My rule is: "Use NSTask, or spawn processes, as little as
possible".
EPILOG
The programmatic Spotlight search executes quickly and was fairly easy
to write, but then I found it didn't look inside packages. So I ended
up using Carbon's File Manager. It's not as fast as Spotlight, and
writing the code was not a cup of Cocoa, but it's done and has been
working in my tests for the last week or so.
I've posted the classes and demos for both solutions in case anyone
has similar needs. They're fairly well-documented with HeaderDoc.
http://www.sheepsystems.com/sourceCode/fileSysSearch.html
_______________________________________________
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