Re: how to get a list of applications?
Re: how to get a list of applications?
- Subject: Re: how to get a list of applications?
- From: petite_abeille <email@hidden>
- Date: Fri, 12 Jul 2002 18:46:00 +0200
On Friday, July 12, 2002, at 06:09 , Diggory Laycock wrote:
I too would like to get a collection of all apps.
NSWorkspace's findApplications method does not return anything: it
seems to update private "records"
Here are some different approach you might take with Foundation:
- NSSearchPathForDirectoriesInDomains to retrieve relevant "standard"
application locations (eg NSApplicationDirectory and so on). There is
also an obscure NSStartSearchPathEnumeration in
/usr/include/NSSystemDirectories.h (thanks to Georg Tuparev for that
one :-)
- NSFileManager directoryContentsAtPath or enumeratorAtPath to enumerate
their content
- NSFileManager fileAttributesAtPath and/or isExecutableFileAtPath to
get more info.
If you really, really want to be double check about an "application"
attribute as seen by the Finder, you can use [NSBundle bundleWithPath]
and check the different infoDictionary information.
If you are adventurous, Karl (aka Hsu) also pointed out a private API in
the LaunchServices framework: LSCopyAllApplicationURLs().
Good luck.
PA.
_______________________________________________
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.