Re: Temporary files
Re: Temporary files
- Subject: Re: Temporary files
- From: Art Isbell <email@hidden>
- Date: Fri, 6 Jul 2001 13:53:17 -1000
On Friday, July 6, 2001, at 05:10 AM, email@hidden wrote:
Is there a preferred way to create and use temporary files in
Cocoa? Should I put them in /tmp ala Unix, or is there an
Apple-prescribed location in OS X?
To prepare your app for whatever operating system it might
run under, put them in NSString *NSTemporaryDirectory(void).
And don't forget to delete them when finished. Not all
operating systems clear out their temporary directories
periodically or during the boot process.
NSProcessInfo's globallyUniqueString is one way to generate
unique temp file names.
Art Isbell
Apple iServices Technical Support
http://www.apple.com/iservices/webobjectssupport/
+1-808-591-0836