Re: Where to save temporary files?
Re: Where to save temporary files?
- Subject: Re: Where to save temporary files?
- From: Kevin Van Vechten <email@hidden>
- Date: Mon, 13 Oct 2008 12:47:47 -0700
On Oct 12, 2008, at 7:07 PM, Jason Coco wrote:
On Oct 12, 2008, at 10:59 , Andre-John Mas wrote:
Hi,
I am try to find out what the right place is to save a temporary
file on the Mac is. I have looked at the following places:
/tmp
~/Library/Caches/<app name>
Are there other locations and are there any suggested usage policies?
I would use confstr(3) with _CS_DARWIN_USER_TEMP_DIR
_CS_DARWIN_USER_TEMP_DIR has similar semantics to /tmp, but is more
secure as that portion of the filesystem is owned by the user. Both
of these locations get cleaned up periodically and at reboot.
Caches typically need to survive past reboot. ~/Library/Caches is a
good location for any cache that contains a user's private data.
- Kevin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden