• 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
Re: CFURLWriteDataAndPropertiesToResource as root?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFURLWriteDataAndPropertiesToResource as root?


  • Subject: Re: CFURLWriteDataAndPropertiesToResource as root?
  • From: Sean McBride <email@hidden>
  • Date: Mon, 08 Aug 2011 18:42:43 -0400
  • Organization: Rogue Research Inc.

On Mon, 8 Aug 2011 16:13:50 -0600, Stephen Blinkhorn said:

>> To be clear, you'd need to use ~/Library/App Support not the one in /
>> Library.
>
>OK, no problem in Cocoa with the stringByExpandingTildeInPath: method
>of NSString. More problematic for CFStringRef though. Is there an
>acknowledged way of doing the equivalent with CFStringRefs? I
>appreciate this is nolonger a Cocoa issue.

Actually, don't use stringByExpandingTildeInPath:.  Paths are deprecated, you should use NSURL or CFURL to reference file system objects.  Instead, do something like this:

	NSFileManager* fileManager = [[NSFileManager alloc] init];
	NSError* error = nil;
	NSURL* url = [fileManager URLForDirectory:NSApplicationSupportDirectory
													 inDomain:NSUserDomainMask
											appropriateForURL:nil
													   create:YES
														error:&error];

Not sure about at the CF level... you could use FSFindFolder() I guess.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CFURLWriteDataAndPropertiesToResource as root?
      • From: Stephen Blinkhorn <email@hidden>
References: 
 >CFURLWriteDataAndPropertiesToResource as root? (From: Stephen Blinkhorn <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Kyle Sluder <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Stephen Blinkhorn <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Eli Bach <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Sean McBride <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Stephen Blinkhorn <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Kyle Sluder <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Stephen Blinkhorn <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Quincey Morris <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Stephen Blinkhorn <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Sean McBride <email@hidden>)
 >Re: CFURLWriteDataAndPropertiesToResource as root? (From: Stephen Blinkhorn <email@hidden>)

  • Prev by Date: Re: CFURLWriteDataAndPropertiesToResource as root?
  • Next by Date: Re: Drawing text like Lion's Mail
  • Previous by thread: Re: CFURLWriteDataAndPropertiesToResource as root?
  • Next by thread: Re: CFURLWriteDataAndPropertiesToResource as root?
  • Index(es):
    • Date
    • Thread