Re: [ANN] Shovel - Third-Party "Software Update"
Re: [ANN] Shovel - Third-Party "Software Update"
- Subject: Re: [ANN] Shovel - Third-Party "Software Update"
- From: Charles Srstka <email@hidden>
- Date: Wed, 24 Mar 2004 18:32:28 -0600
On Mar 24, 2004, at 4:30 PM, Bjoern Kriews wrote:
On 24.03.2004, at 22:35, Kevin Ballard wrote:
On Mar 24, 2004, at 4:16 PM, M. Uli Kusterer wrote:
I have a ~/Games folder, and I assume other people do that too (I'm
guessing there's probably some people with a /Games folder as well).
Oh, I forgot about /Developer/Applications as well. But why scan all
of
the home folder? The only necessary folder is ~/Applications (and, in
my case, ~/Games)? Nothing else is useful.
That is a pretty bold assumption :-)
For example, my layout looks like this:
/Local/Applications
/Local/Users/me
And I have a pretty good reason for that:
My home gets backed up much more frequently than /Local/Applications
and I want to keep out the Apps so it fits on a single DVD-R.
I'd prefer Alastairs FSCatalogSearch approach, sounds like the right
thing.
Probably the fastest way to list all apps on your drive is to use
LaunchServices; these two lines of code will get you an NSArray filled
with an NSURL for each application on the system, wherever it may be
stored.
NSArray *urls;
_LSCopyAllApplicationURLs(&urls);
Unfortunately, the _LSCopyAllApplicationURLs() function is private and
undocumented. But it does work, and since it's usually reading cached
information out of the LaunchServices database, it's much faster than a
file search. I don't know why Apple doesn't open this up - it would
make things easier for people who have to do things similar to what you
are doing to do it in the most user-friendly way possible.
Charles
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.