Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Searching for Specific Files/Problem with hiding on login



Launch Services is a much better way to do this, for applications at least. The system keeps track of applications for you, why reinvent the wheel? Search for it in the archives (cocoa.mamasam.com) or look at LaunchServices.h. In particular LSFindApplication.

Searching for a particular file needs something more, but you should generally be popping up an open dialog box if it isn't in a known place.

Also you may want to look at CFBundleVersion (as appears in Info.plist files), if you want the exact version of an application. There's probably a high-level API for this but it escapes me right now.

Regards,

Tom

On Friday, July 18, 2003, at 07:48 pm, Thomas Harrington wrote:

On Wednesday, July 16, 2003, at 08:44 PM, Simone Manganelli wrote:

First, I'm wondering what the best way is to search (a) user's hard drive(s) for a specific application or file. For example, what if I wanted to find out where a user placed the application "OmniWeb" on his hard drive. And, coming off of that question, how would I identify if the user doesn't have the required app/file? Would I refer to the file by the get info string, the exact size, or what? (Obviously I have no experience in this area, so I'm shooting in the dark.)

How about:

NSDirectoryEnumerator *dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:@"/"];

Depending on the situation, it might be best to run this in a separate thread.

--
Tom Harrington
email@hidden
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Re: Searching for Specific Files/Problem with hiding on login (From: Thomas Harrington <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.