• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Searching for Specific Files/Problem with hiding on login
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Re: Searching for Specific Files/Problem with hiding on login
  • From: Tom Sutcliffe <email@hidden>
  • Date: Fri, 18 Jul 2003 21:36:35 +0100

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>)

  • Prev by Date: Re: Searching for Specific Files/Problem with hiding on login
  • Next by Date: Smaller panels?
  • Previous by thread: Re: Searching for Specific Files/Problem with hiding on login
  • Next by thread: NSToolbar Acting as Tabs
  • Index(es):
    • Date
    • Thread