• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Temporary files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Temporary files (From: email@hidden)

  • Prev by Date: Re: How do I turn off the spinning multi-colored cursor? I don't want to con...
  • Next by Date: Re: NSTableView Drag & Drop again...
  • Previous by thread: Temporary files
  • Next by thread: Maybe a complex question on NSTableView and Drag & Drop...
  • Index(es):
    • Date
    • Thread