Reverse of fullPathForApplication
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.