Re: Where to save temporary files?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Oct 12, 2008, at 7:07 PM, Jason Coco wrote: On Oct 12, 2008, at 10:59 , Andre-John Mas wrote: Hi, - Kevin _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Kevin Van Vechten