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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to