Re: Where to find?
Re: Where to find?
- Subject: Re: Where to find?
- From: Uli Kusterer <email@hidden>
- Date: Tue, 11 May 2010 00:10:13 +0200
On 10.05.2010, at 23:59, ML wrote:
> Can anyone point me in a direction of the proper way to find a users home directory
Look at NSHomeDirectory() or NSHomeDirectoryForUser() ?
> and where to find where applications are installed or can I always assume /Applications?
There is no place "where applications are installed" on the Mac. An application can be anywhere a user decides to put them. On the desktop, on a server, on a disk image. What would you use this information for? Why would you even care?
If you are trying to find out whether a particular application is installed, ask Launch Services for an application with the same bundle ID. If you want to find what application is responsible for a certain type of file, Launch Services can also tell you that (or if you just want to launch a file with the right application, use NSWorkspace).
If you want a list of all applications on a Mac, you may have to go through Spotlight. But that takes time, CPU, and as such is generally not what you want to do.
If you tell us more precisely what you are trying to achieve, as a high-level task, we might be able to make a better suggestion.
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.masters-of-the-void.com
_______________________________________________
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