Re: temporary files and subsequent cleanup
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