Re: Where to save temporary files?
Re: Where to save temporary files?
- Subject: Re: Where to save temporary files?
- From: Philip Aker <email@hidden>
- Date: Sun, 12 Oct 2008 08:21:34 -0700
On Oct 12, 2008, at 7:59 AM, Andre-John Mas wrote:
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?
To elaborate: what I am looking at is a file to be downloaded by a
web browser, in order to directly be opened up by another
application. In order for the other application to have access to it
I will have to save it somewhere, though I am not sure where I
should be saving it and what sort of life-span this file should have
on the user's hard-disk.
For the circumstance, I think it would be: defaults read
com.apple.Safari DownloadsPath (use realpath on it).
Several levels up there would be FSFindFolder() in Folders.h
(kDownloadsFolderType, kCachedDataFolderType, etc.).
Also there's $TMPDIR but you'd probably want to create your own
subfolder in it. I'm not sure if it would be in keeping with standard
usage for that folder though.
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
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