Re: Best way of getting /Library/Preferences paths?
Re: Best way of getting /Library/Preferences paths?
- Subject: Re: Best way of getting /Library/Preferences paths?
- From: Finlay Dobbie <email@hidden>
- Date: Sat, 18 Sep 2004 11:36:27 +0100
Your code leaks. I edited it below :-)
On 18 Sep 2004, at 10:20, Andreas Mayer wrote:
- (NSString *)findSystemFolderType:(int)folderType
forDomain:(int)domain
{
FSRef folder;
OSErr err = noErr;
CFURLRef url;
NSString *result = nil;
err = FSFindFolder(domain, folderType, false, &folder);
if (err == noErr) {
url = CFURLCreateFromFSRef(kCFAllocatorDefault, &folder);
if (url != NULL) {
result = [(NSURL *)url path];
CFRelease(url);
}
}
return result;
}
:-)
-- Finlay
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden