Re: Best practice for creating a temporary file
Re: Best practice for creating a temporary file
- Subject: Re: Best practice for creating a temporary file
- From: Quincey Morris <email@hidden>
- Date: Tue, 02 Sep 2014 23:05:52 +0000
On Sep 2, 2014, at 09:47 , Jens Alfke <email@hidden> wrote:
> So far I've been using NSItemReplacementDirectory, but this has a couple of problems:
> (1) It creates a new visible directory right next to the permanent location, called "(A Document being saved by $APP") where $APP is the app name.
FWIW, this is not the behavior I’ve seen. With this code:
[fileManager URLForDirectory: NSItemReplacementDirectory
inDomain: NSUserDomainMask
appropriateForURL: importURL
create: YES
error: &error]
I get a URL to a new folder in the private (secure) temporary directory, and *not* in the parent of ‘importURL’. I don’t know why you’re seeing something different.
_______________________________________________
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