CFURLRef -> NSRURL* ???
CFURLRef -> NSRURL* ???
- Subject: CFURLRef -> NSRURL* ???
- From: Lloyd Dupont <email@hidden>
- Date: Tue, 25 Mar 2003 10:52:20 +1100
on the archive I see this sample of code (<see at the end of the mail>)
where the guy simply cast a CFURLRef to a NSURL* !!!!
is it correct ?
does it work for CFStringRef -> NSString* and
CFNumberRef -> NSNumber* ???
// ---- code sample ----
- (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);
result = [(NSURL *)url path];
}
return result;
}
_______________________________________________
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.