tempDirectory

Hi Jules,

I would like to know why tempDirectory on mac is not /tmp ?

Or maybe would it be preferable to use FindFolder with kTemporaryFolderType

here is an implementation example
http://lists.apple.com/archives/carbon-dev/2006/Jun/msg00052.html

Thanks,

I think it’s better to use a user-specific temp folder if possible, and that’s what the caches folder is there for. I’m avoiding any carbon calls at the moment, so probably won’t use findfolder, but there’s probably a cocoa equivalent.

The Cocoa call is a string constant in NSPathUtilities.h

NSTemporaryDirectory() gives you an NSString* / CFStringRef to the tmp directory (actually I think its /private/tmp somewhere)

but you have to remove your temp items yourself otherwise they show up in the user’s trash when they restart, so I tend to use my own local caches folder now.