• 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 and subsequent cleanup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: temporary files and subsequent cleanup


  • Subject: Re: temporary files and subsequent cleanup
  • From: Chris Heimark <email@hidden>
  • Date: Fri, 26 Oct 2007 13:55:14 -0400

I am actually needing to be sure these files are "nuked", so I have been using the fileManager:willProcessPath: delegate method as a hook to actually "nuke" the files before they are deleted for me by the removeFileAtPath: method. I am building a "security" program which has a duty is to make sure it leaves no trace of its' own activities.

If you are only storing files during a single run of your application
(not between runs), you aren't sharing the files with anything else,
you have a small number of temporary files AND you can keep them open
at all times, you can probably use an old UNIX trick to ensure that
they are always removed, even if your application crashes.  After
opening the file, unlink it, and don't close the file handle.  The
file is gone as far as anything else is concerned, but your app can
still read and write to it.  As soon as the last file handle is
closed, the file really goes away.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >temporary files and subsequent cleanup (From: Chris Heimark <email@hidden>)
 >Re: temporary files and subsequent cleanup (From: Brian Stern <email@hidden>)
 >Re: temporary files and subsequent cleanup (From: Alastair Houghton <email@hidden>)
 >Re: temporary files and subsequent cleanup (From: Alastair Houghton <email@hidden>)
 >Re: temporary files and subsequent cleanup (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: NSTokenField in NSScrollView
  • Next by Date: Re: NSTokenField in NSScrollView
  • Previous by thread: Re: temporary files and subsequent cleanup
  • Next by thread: Re: temporary files and subsequent cleanup
  • Index(es):
    • Date
    • Thread