• 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
Reverse of fullPathForApplication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reverse of fullPathForApplication


  • Subject: Reverse of fullPathForApplication
  • From: Glen Low <email@hidden>
  • Date: Sat, 10 Jul 2004 00:13:04 +0800

Dear All,

If I have an application name and I want to get it's path, I can use

[[NSWorkspace sharedWorkspace] fullPathForApplication: name]

How do I do the reverse? i.e. if I have the path, I want the application name.

Some candidates:

1. [[NSFileManager defaultManager] displayNameAtPath: path] seems to be it. But this could end up including the localized bundle name...
2. [path lastPathComponent] is another possibility. But something nagging at the back of my skull says, is there ever a case where fullPathForApplication: xxx doesn't return a path with xxx at the end of it??


Cheers, Glen Low


---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
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: Reverse of fullPathForApplication
      • From: Audun Wilhelmsen <email@hidden>
  • Prev by Date: 2003 Cocoa Tips & Tricks Sample code request
  • Next by Date: Re: selectionShouldChangeInTableView example?
  • Previous by thread: 2003 Cocoa Tips & Tricks Sample code request
  • Next by thread: Re: Reverse of fullPathForApplication
  • Index(es):
    • Date
    • Thread