where do I find the temp folder on a Mac?
Devin Asay
devin_asay at byu.edu
Tue Nov 18 18:02:33 EST 2008
On Nov 18, 2008, at 12:45 PM, Sarah Reichelt wrote:
>
> I have found 3 different temporary folders. Try this command in the
> message box:
> put specialFolderPath("temp") & cr & the tempname & cr & $TMPDIR
>
> It gives me:
>
> /Users/sarah/Library/Caches/TemporaryItems
> /private/var/folders/vF/vFLJdnX0Er44KsbRytuL1U+++TI/TemporaryItems/
> tmp2
> /var/folders/vF/vFLJdnX0Er44KsbRytuL1U+++TI/-Tmp-/
>
> So my question is: which one should I use?
> In my case, I need it to catch the output from a shell command running
> in the background.
> So the shell needs to be able to write, my Rev app needs to be able to
> read, and preferably to delete the file afterwards to tidy up.
>
> I have been using $TMPDIR and that works fine, but
> specialFolderPath("temp") looks a lot nicer.
>
> Are they all functionally the same or are there any differences,
> particularly if running a non-admin account?
As far as I know the /tmp folder (actually /private/tmp) on OS X is
the only one that gets automatically cleaned out on reboot. On a
related note, here's some guidance from Apple about where to store
temporary files:
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/WhereToPutFiles.html
>
Regards,
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list