• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CFURLRef -> NSRURL* ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: CFURLRef -> NSRURL* ???
      • From: Umed Zokirov <email@hidden>
    • Re: CFURLRef -> NSRURL* ???
      • From: David Remahl <email@hidden>
References: 
 >Re: Correct way to locate 'Application Support' folder? (From: Greg Hurrell <email@hidden>)

  • Prev by Date: Re: Correct way to locate 'Application Support' folder?
  • Next by Date: Re: CFURLRef -> NSRURL* ???
  • Previous by thread: Re: Correct way to locate 'Application Support' folder?
  • Next by thread: Re: CFURLRef -> NSRURL* ???
  • Index(es):
    • Date
    • Thread