Re: which temp dir to use?
Re: which temp dir to use?
- Subject: Re: which temp dir to use?
- From: Richard Frith-Macdonald <email@hidden>
- Date: Sat, 23 May 2009 12:26:06 +0100
On 23 May 2009, at 11:43, Nick Rogers wrote:
Hi,
NSTemporaryDirectory(), returns something like /var/temp/we/weOIDM
+mck............
Whereas I want to store files at a place with a fixed path.
So where should I save temp files? and how can I get that path
programatically everytime?
What you want is user specific and application specific I presume (ie
you want to store the data your your application, and for the person
who is running the application). I guess it's not really temporary
(or you wouldn't need a fixed path), but is actually information you
would like to keep around, but which is not essential for your
application.
The place for that is the standard per-user application support
directory, and you get that using the
NSSearchPathForDirectoriesInDomains() function specifying the
NSApplicationSupportDirectory and NSUserDomainMask
Given that directory, you can just append the name of your application
and make a subdirectory to hold your files.
_______________________________________________
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