开发者

Get Bundle name from its executable

Given the path for a bund开发者_如何学Cle, how can I get the name of its executable?

Example:

blahblah.app

should give me

blahblah.app/Contents/MacOS/blahblah

Vice versa will also be okay


NSString *exe = [[NSBundle bundleWithPath:thePath] executablePath];

You can also use the URL variants if you're on Snow Leopard and want URLs instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜