• 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: Get default Browser and Mail Client
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get default Browser and Mail Client


  • Subject: Re: Get default Browser and Mail Client
  • From: David Remahl <email@hidden>
  • Date: Tue, 17 Sep 2002 15:08:47 +0200

> On Tuesday, September 17, 2002, at 05:02 , Stephane ODUL wrote:
>
>> By the way is there a cleaner way than regex to extract the name of the
>> app from the URL I get: I receive /Applications/Internet/Navigator.app
>> and I want "Navigator".
>
> Hmmmm... would
>
> [[path lastPathComponent] stringByDeletingPathExtension]
>
> be sufficient?

Apple's recommended way is to use

[[NSFileManager defaultManager] displayNameAtPath:path];

This will show the file name extension on files where it should, and hide it
on those where it should. It will also show localized names whene available.

/ David Remahl
_______________________________________________
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.

  • Follow-Ups:
    • Re: Get default Browser and Mail Client
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Get default Browser and Mail Client (From: Ondra Cada <email@hidden>)

  • Prev by Date: Protected NIB
  • Next by Date: Re[2]: objective-c.org conquered
  • Previous by thread: Re: Get default Browser and Mail Client
  • Next by thread: Re: Get default Browser and Mail Client
  • Index(es):
    • Date
    • Thread