Re: How to get PrivateFramework's URL
Re: How to get PrivateFramework's URL
- Subject: Re: How to get PrivateFramework's URL
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 17 Mar 2003 21:48:00 -0800
On Monday, March 17, 2003, at 09:29 PM, Noriaki Misawa wrote:
I want to get a file in PrivateFramework.
It is
System/Library/PrivateFrameworks/NetworkConfig.framework/Versions/A/
Resources/Japanese.lproj/PortNames.strings.
I want to read this file. How to get this URL?
Assuming you are using Cocoa, try something like this: (note - written
in Mail, not tested, use at your own risk, etc.)
NSBundle *networkConfigBundle = [NSBundle
bundleWithPath:@"/System/Library/PrivateFrameworks/
NetworkConfig.framework"];
NSString *pathToResource = [networkConfigBundle
pathForResource:@"PortNames.strings"];
NSURL *urlToResource = [NSURL fileURLWithPath:pathToResource];
Then "urlToResource" should hold the URL to the file
"PortNames.strings" on the user's system. This ought to return the
user's localized PortNames.strings file...
Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page:
http://dreamless.home.attbi.com/
Smile! It confuses people!
_______________________________________________
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.