• 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: NSURL-based replacement for NSTemporaryDirectory()?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURL-based replacement for NSTemporaryDirectory()?


  • Subject: Re: NSURL-based replacement for NSTemporaryDirectory()?
  • From: Sean McBride <email@hidden>
  • Date: Thu, 05 Apr 2012 20:08:42 -0400
  • Organization: Rogue Research Inc.

On Thu, 5 Apr 2012 18:48:05 -0500, Charles Srstka said:

>NSItemReplacementDirectory isn’t what you want either; that’s supposed
>to be used for implementing a safe save feature, IIRC.

Actually, the docs for URLForDirectory::::: say "You can also use this method to create a new temporary directory for storing things like autosave files; to do so..."

>Probably your best bet is [NSURL file
>URLWithPath:NSTemporaryDirectory()].

Except that doesn't replace NSTemporaryDirectory at all! :)

But indeed, it seems like it's the best thing, unless someone else has a better idea...

>I actually still use the
>FSFindFolder() API and then use CFURLCreateFromFSRef() to get a URL, but
>that’s looking less and less like a good solution these days.

Agreed.

>filed a radar report on this last week (rdar://11142974); there are
>actually quite a lot of directories that are not available via -
>URLForDirectory:inDomain:bla:bla:bla: that were available via the older
>FSFindFolder() API, many of which were quite useful. A few of them are:

They've been missing since 10.0, don't get your hopes up.  IMNSHO, dupes are a waste of time here.

>And a whole lot more. Feel free to file a radar report yourself if you
>agree that -URLForDirectory:etc:etc:etc:etc: needs to be beefed up;

Got ya beat, my bug on this is <rdar://3934743>.  I'm sure it'll be fixed any day now!

>Apple uses duplicate radar reports to prioritize fixes.

A tired refrain (no offense).

Cheers,

--
____________________________________________________________
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: NSURL-based replacement for NSTemporaryDirectory()?
      • From: Greg Parker <email@hidden>
References: 
 >NSURL-based replacement for NSTemporaryDirectory()? (From: Sean McBride <email@hidden>)
 >Re: NSURL-based replacement for NSTemporaryDirectory()? (From: Charles Srstka <email@hidden>)

  • Prev by Date: iOS 5: AVFoundation and MPMediaItemPropertyAssetURL
  • Next by Date: Re: NSURL-based replacement for NSTemporaryDirectory()?
  • Previous by thread: Re: NSURL-based replacement for NSTemporaryDirectory()?
  • Next by thread: Re: NSURL-based replacement for NSTemporaryDirectory()?
  • Index(es):
    • Date
    • Thread